Module: SimpleCommandDispatcher::Commands::CommandCallable::ClassMethods

Defined in:
lib/simple_command_dispatcher/commands/command_callable.rb

Instance Method Summary collapse

Instance Method Details

#callObject

Creates a new instance of the command and calls it, passing all arguments through.

Parameters:

  • args (Array)

    positional arguments passed to initialize

  • kwargs (Hash)

    keyword arguments passed to initialize

Returns:

  • (Object)

    the command instance (not the result - use .result to get the return value)



46
47
48
# File 'lib/simple_command_dispatcher/commands/command_callable.rb', line 46

def call(...)
  new(...).call
end