Class: Chieftain::Command::Error
- Inherits:
-
Object
- Object
- Chieftain::Command::Error
- Defined in:
- lib/chieftain/command.rb
Overview
The type associated with errors that prevent a Command from executing.
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#message ⇒ Object
(also: #to_s)
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(message, code = nil) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(message, code = nil) ⇒ Error
Returns a new instance of Error.
9 10 11 12 |
# File 'lib/chieftain/command.rb', line 9 def initialize(, code=nil) @code = code = end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
13 14 15 |
# File 'lib/chieftain/command.rb', line 13 def code @code end |
#message ⇒ Object (readonly) Also known as: to_s
Returns the value of attribute message.
13 14 15 |
# File 'lib/chieftain/command.rb', line 13 def end |