Class: FluentCommandBuilder::Tf::TEE2010::Rename

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

Instance Method Summary collapse

Methods inherited from CommandBase

#execute!, #to_s

Constructor Details

#initialize(builder, old_item, new_item) ⇒ Rename

Returns a new instance of Rename.



1324
1325
1326
1327
# File 'lib/fluent_command_builder/command_builders/tf_tee_2010.rb', line 1324

def initialize(builder, old_item, new_item)
  super builder
  @builder.append " rename #{@builder.format old_item} #{@builder.format new_item}"
end

Instance Method Details

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

Yields:

  • (@builder)


1328
1329
1330
1331
1332
# File 'lib/fluent_command_builder/command_builders/tf_tee_2010.rb', line 1328

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)


1333
1334
1335
1336
1337
1338
# File 'lib/fluent_command_builder/command_builders/tf_tee_2010.rb', line 1333

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