Exception: MotherBrain::ComponentNotFound

Inherits:
MBError
  • Object
show all
Defined in:
lib/mb/errors.rb

Constant Summary

Constants inherited from MBError

MBError::DEFAULT_EXIT_CODE

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from MBError

#error_code, error_code, exit_code, #exit_code, #to_hash, #to_json, #to_s

Constructor Details

#initialize(name, plugin) ⇒ ComponentNotFound

Returns a new instance of ComponentNotFound.

Parameters:



314
315
316
317
# File 'lib/mb/errors.rb', line 314

def initialize(name, plugin)
  @name   = name
  @plugin = plugin
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



309
310
311
# File 'lib/mb/errors.rb', line 309

def name
  @name
end

#pluginObject (readonly)

Returns the value of attribute plugin.



310
311
312
# File 'lib/mb/errors.rb', line 310

def plugin
  @plugin
end

Instance Method Details

#messageObject



319
320
321
# File 'lib/mb/errors.rb', line 319

def message
  "Plugin #{plugin} does not have the component: '#{name}'"
end