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.
278 279 280 281 |
# File 'lib/mb/errors.rb', line 278 def initialize(name, parent) @name = name @parent = parent end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
271 272 273 |
# File 'lib/mb/errors.rb', line 271 def name @name end |
#parent ⇒ Object (readonly)
Returns the value of attribute parent.
272 273 274 |
# File 'lib/mb/errors.rb', line 272 def parent @parent end |
Instance Method Details
#message ⇒ Object
283 284 285 |
# File 'lib/mb/errors.rb', line 283 def "#{parent.class} '#{parent}' does not have the command: '#{name}'" end |