Class: FluentCommandBuilder::Schtasks::V61::Query

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) ⇒ Query

Returns a new instance of Query.



289
290
291
292
# File 'lib/fluent_command_builder/command_builders/schtasks_61.rb', line 289

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

Instance Method Details

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

Yields:

  • (@b)


303
304
305
306
307
# File 'lib/fluent_command_builder/command_builders/schtasks_61.rb', line 303

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

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

Yields:

  • (@b)


308
309
310
311
312
313
314
# File 'lib/fluent_command_builder/command_builders/schtasks_61.rb', line 308

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

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

Yields:

  • (@b)


293
294
295
296
297
# File 'lib/fluent_command_builder/command_builders/schtasks_61.rb', line 293

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

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

Yields:

  • (@b)


315
316
317
318
319
# File 'lib/fluent_command_builder/command_builders/schtasks_61.rb', line 315

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

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

Yields:

  • (@b)


298
299
300
301
302
# File 'lib/fluent_command_builder/command_builders/schtasks_61.rb', line 298

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