Exception: MotherBrain::PluginNotFound
- 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.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(name, version = nil) ⇒ PluginNotFound
constructor
A new instance of PluginNotFound.
- #message ⇒ Object
Methods inherited from MBError
#error_code, error_code, exit_code, #exit_code, #to_hash, #to_json, #to_s
Constructor Details
#initialize(name, version = nil) ⇒ PluginNotFound
Returns a new instance of PluginNotFound.
262 263 264 265 |
# File 'lib/mb/errors.rb', line 262 def initialize(name, version = nil) @name = name @version = version end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
259 260 261 |
# File 'lib/mb/errors.rb', line 259 def name @name end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
260 261 262 |
# File 'lib/mb/errors.rb', line 260 def version @version end |
Instance Method Details
#message ⇒ Object
267 268 269 270 271 |
# File 'lib/mb/errors.rb', line 267 def msg = "No plugin named '#{name}'" msg << " of version (#{version})" unless version.nil? msg << " found" end |