Class: FluentCommandBuilder::Tf::TEE2010::Checkout

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, item_spec = nil) ⇒ Checkout

Returns a new instance of Checkout.



442
443
444
445
446
# File 'lib/fluent_command_builder/command_builders/tf_tee_2010.rb', line 442

def initialize(builder, item_spec=nil)
  super builder
  @builder.append ' checkout'
  @builder.append " #{@builder.format item_spec}" unless item_spec.nil?
end

Instance Method Details

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

Yields:

  • (@builder)


447
448
449
450
451
# File 'lib/fluent_command_builder/command_builders/tf_tee_2010.rb', line 447

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)


462
463
464
465
466
467
# File 'lib/fluent_command_builder/command_builders/tf_tee_2010.rb', line 462

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)


452
453
454
455
456
# File 'lib/fluent_command_builder/command_builders/tf_tee_2010.rb', line 452

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

#type(encoding) {|@builder| ... } ⇒ Object

Yields:

  • (@builder)


457
458
459
460
461
# File 'lib/fluent_command_builder/command_builders/tf_tee_2010.rb', line 457

def type(encoding)
  @builder.append " -type:#{@builder.format encoding}"
  yield @builder if block_given?
  self
end