Class: FluentCommandBuilder::Schtasks::V61::Run

Inherits:
CommandBase
  • Object
show all
Defined in:
lib/fluent_command_builder/command_builders/schtasks_61.rb

Instance Method Summary collapse

Methods inherited from CommandBase

#configure!, #execute!, #to_s

Constructor Details

#initialize(underlying_builder) ⇒ Run

Returns a new instance of Run.



243
244
245
246
# File 'lib/fluent_command_builder/command_builders/schtasks_61.rb', line 243

def initialize(underlying_builder)
  super underlying_builder
  @b.append ' /run'
end

Instance Method Details

#computer(computer, username = nil, password = nil) {|@b| ... } ⇒ Object

Yields:

  • (@b)


252
253
254
255
256
257
258
# File 'lib/fluent_command_builder/command_builders/schtasks_61.rb', line 252

def computer(computer, username=nil, password=nil)
  @b.append " /s #{@b.format computer}"
  @b.append " /u #{@b.format username}" unless username.nil?
  @b.append " /p #{@b.format_password password}" unless password.nil?
  yield @b if block_given?
  self
end

#help {|@b| ... } ⇒ Object

Yields:

  • (@b)


259
260
261
262
263
# File 'lib/fluent_command_builder/command_builders/schtasks_61.rb', line 259

def help
  @b.append ' /?'
  yield @b if block_given?
  self
end

#task_name(task_name) {|@b| ... } ⇒ Object

Yields:

  • (@b)


247
248
249
250
251
# File 'lib/fluent_command_builder/command_builders/schtasks_61.rb', line 247

def task_name(task_name)
  @b.append " /tn #{@b.format task_name}"
  yield @b if block_given?
  self
end