Method: CommandMapper::Command.run

Defined in:
lib/command_mapper/command.rb

.run(params = {}, **kwargs) {|command| ... } ⇒ Boolean?

Initializes and runs the command.

Parameters:

  • params (Hash{Symbol => Object}) (defaults to: {})

    The option and argument values.

  • kwargs (Hash{Symbol => Object})

    Additional keywords arguments. These will be used to populate the command's params.

Yields:

  • (command)

    The newly initialized command.

Yield Parameters:

Returns:

  • (Boolean, nil)
[View source]

105
106
107
108
# File 'lib/command_mapper/command.rb', line 105

def self.run(params={},**kwargs,&block)
  command = new(params,**kwargs,&block)
  command.run_command
end