Exception: MotherBrain::CommandNotFound
- Defined in:
- lib/mb/errors.rb
Constant Summary
Constants inherited from MBError
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#parent ⇒ Object
readonly
Returns the value of attribute parent.
Instance Method Summary collapse
-
#initialize(name, parent) ⇒ CommandNotFound
constructor
A new instance of CommandNotFound.
- #message ⇒ Object
Methods inherited from MBError
#error_code, error_code, exit_code, #exit_code, #to_hash, #to_json, #to_s
Constructor Details
#initialize(name, parent) ⇒ CommandNotFound
Returns a new instance of CommandNotFound.
295 296 297 298 |
# File 'lib/mb/errors.rb', line 295 def initialize(name, parent) @name = name @parent = parent end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
288 289 290 |
# File 'lib/mb/errors.rb', line 288 def name @name end |
#parent ⇒ Object (readonly)
Returns the value of attribute parent.
289 290 291 |
# File 'lib/mb/errors.rb', line 289 def parent @parent end |
Instance Method Details
#message ⇒ Object
300 301 302 |
# File 'lib/mb/errors.rb', line 300 def "#{parent.class} '#{parent}' does not have the command: '#{name}'" end |