Class: FluentCommandBuilder::Tf::V2010::Add
- Inherits:
-
CommandBase
- Object
- CommandBase
- FluentCommandBuilder::Tf::V2010::Add
- Defined in:
- lib/fluent_command_builder/command_builders/tf_2010.rb
Instance Method Summary collapse
-
#initialize(builder, item_spec) ⇒ Add
constructor
A new instance of Add.
- #lock(lock_type) {|@builder| ... } ⇒ Object
- #login(username, password = nil) {|@builder| ... } ⇒ Object
- #no_prompt {|@builder| ... } ⇒ Object
- #recursive {|@builder| ... } ⇒ Object
- #type(file_type) {|@builder| ... } ⇒ Object
Methods inherited from CommandBase
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
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
233 234 235 236 237 238 |
# File 'lib/fluent_command_builder/command_builders/tf_2010.rb', line 233 def login(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
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
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
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 |