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:



297
298
299
300
# File 'lib/mb/errors.rb', line 297

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

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



292
293
294
# File 'lib/mb/errors.rb', line 292

def name
  @name
end

#pluginObject (readonly)

Returns the value of attribute plugin.



293
294
295
# File 'lib/mb/errors.rb', line 293

def plugin
  @plugin
end

Instance Method Details

#messageObject



302
303
304
# File 'lib/mb/errors.rb', line 302

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