Class: FluentCommandBuilder::Tf::V2010::Delete

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

Instance Method Summary collapse

Methods inherited from CommandBase

#execute!, #to_s

Constructor Details

#initialize(builder, item_spec) ⇒ Delete



500
501
502
503
# File 'lib/fluent_command_builder/command_builders/tf_2010.rb', line 500

def initialize(builder, item_spec)
  super builder
  @builder.append " delete #{@builder.format item_spec}"
end

Instance Method Details

#lock(lock_type) {|@builder| ... } ⇒ Object

Yields:

  • (@builder)


504
505
506
507
508
# File 'lib/fluent_command_builder/command_builders/tf_2010.rb', line 504

def lock(lock_type)
  @builder.append " /lock:#{@builder.format lock_type}"
  yield @builder if block_given?
  self
end

#login(username, password = nil) {|@builder| ... } ⇒ Object

Yields:

  • (@builder)


514
515
516
517
518
519
# File 'lib/fluent_command_builder/command_builders/tf_2010.rb', line 514

def (username, password=nil)
  @builder.append " /login:#{@builder.format username}"
  @builder.append ",#{@builder.format password}" unless password.nil?
  yield @builder if block_given?
  self
end

#recursive {|@builder| ... } ⇒ Object

Yields:

  • (@builder)


509
510
511
512
513
# File 'lib/fluent_command_builder/command_builders/tf_2010.rb', line 509

def recursive
  @builder.append ' /recursive'
  yield @builder if block_given?
  self
end