Method: Domainic::Command::InstanceMethods#call

Defined in:
lib/domainic/command/instance_methods.rb

#call(**context) ⇒ Result

Executes the command with the given context, handling any errors

Parameters:

  • context (Hash)

    The input context for the command

Returns:

  • (Result)

    The result of the command execution

Since:

  • 0.1.0



20
21
22
23
24
# File 'lib/domainic/command/instance_methods.rb', line 20

def call(**context)
  call!(**context)
rescue ExecutionError => e
  e.result
end