Method: Kontena::Command#instance

Defined in:
lib/kontena/command.rb

#instance(arguments) ⇒ Object

Returns an instance of the command, just like with Kontena.run! but before calling “execute” You can use it for specs or reuse of instancemethods. Example:

cmd = Kontena::FooCommand.instance(['-n', 'foo'])
cmd.fetch_stuff


194
195
196
197
198
# File 'lib/kontena/command.rb', line 194

def instance(arguments)
  @arguments = arguments
  parse @arguments
  self
end