Class: FluentCommandBuilder::Tf::V2010::Add

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

Returns a new instance of Add.



209
210
211
212
# File 'lib/fluent_command_builder/command_builders/tf_2010.rb', line 209

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

Instance Method Details

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

Yields:

  • (@builder)


213
214
215
216
217
# File 'lib/fluent_command_builder/command_builders/tf_2010.rb', line 213

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)


233
234
235
236
237
238
# File 'lib/fluent_command_builder/command_builders/tf_2010.rb', line 233

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

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

Yields:

  • (@builder)


223
224
225
226
227
# File 'lib/fluent_command_builder/command_builders/tf_2010.rb', line 223

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

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

Yields:

  • (@builder)


228
229
230
231
232
# File 'lib/fluent_command_builder/command_builders/tf_2010.rb', line 228

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

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

Yields:

  • (@builder)


218
219
220
221
222
# File 'lib/fluent_command_builder/command_builders/tf_2010.rb', line 218

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