Class: Cuprum::Errors::CommandNotImplemented
- Inherits:
-
Cuprum::Error
- Object
- Cuprum::Error
- Cuprum::Errors::CommandNotImplemented
- Defined in:
- lib/cuprum/errors/command_not_implemented.rb
Overview
Error returned when a Command is called without defining a #process method.
Constant Summary collapse
- TYPE =
Short string used to identify the type of error.
'cuprum.errors.command_not_implemented'
Instance Attribute Summary collapse
-
#command ⇒ Cuprum::Command
readonly
The command called without a definition.
Attributes inherited from Cuprum::Error
Instance Method Summary collapse
-
#initialize(command:) ⇒ CommandNotImplemented
constructor
A new instance of CommandNotImplemented.
Methods inherited from Cuprum::Error
Constructor Details
#initialize(command:) ⇒ CommandNotImplemented
Returns a new instance of CommandNotImplemented.
19 20 21 22 23 24 25 26 |
# File 'lib/cuprum/errors/command_not_implemented.rb', line 19 def initialize(command:) @command = command class_name = command&.class&.name || 'command' = MESSAGE_FORMAT % class_name super(command: command, message: ) end |
Instance Attribute Details
#command ⇒ Cuprum::Command (readonly)
Returns The command called without a definition.
29 30 31 |
# File 'lib/cuprum/errors/command_not_implemented.rb', line 29 def command @command end |