Class: RBoss::Cli::CommandBuilder
- Inherits:
-
Object
- Object
- RBoss::Cli::CommandBuilder
- Defined in:
- lib/rboss/cli/invoker.rb
Instance Method Summary collapse
- #<<(param) ⇒ Object
-
#initialize(operation) ⇒ CommandBuilder
constructor
A new instance of CommandBuilder.
- #to_s ⇒ Object
Constructor Details
#initialize(operation) ⇒ CommandBuilder
Returns a new instance of CommandBuilder.
170 171 172 173 |
# File 'lib/rboss/cli/invoker.rb', line 170 def initialize (operation) @operation = operation @params = {} end |
Instance Method Details
#<<(param) ⇒ Object
175 176 177 |
# File 'lib/rboss/cli/invoker.rb', line 175 def << (param) @params[param[:name]] = param[:value] end |
#to_s ⇒ Object
179 180 181 182 |
# File 'lib/rboss/cli/invoker.rb', line 179 def to_s params = (@params.collect() { |k, v| "#{k}=#{v}" }).join ',' "#@operation(#{params})" end |