Exception: Machinist::NoBlueprintError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Machinist::NoBlueprintError
- Defined in:
- lib/machinist/exceptions.rb
Overview
Raised when calling make on a class with no corresponding blueprint defined.
Instance Attribute Summary collapse
-
#klass ⇒ Object
readonly
Returns the value of attribute klass.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(klass, name) ⇒ NoBlueprintError
constructor
A new instance of NoBlueprintError.
- #message ⇒ Object
Constructor Details
#initialize(klass, name) ⇒ NoBlueprintError
Returns a new instance of NoBlueprintError.
22 23 24 25 |
# File 'lib/machinist/exceptions.rb', line 22 def initialize(klass, name) @klass = klass @name = name end |
Instance Attribute Details
#klass ⇒ Object (readonly)
Returns the value of attribute klass.
20 21 22 |
# File 'lib/machinist/exceptions.rb', line 20 def klass @klass end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
20 21 22 |
# File 'lib/machinist/exceptions.rb', line 20 def name @name end |
Instance Method Details
#message ⇒ Object
27 28 29 |
# File 'lib/machinist/exceptions.rb', line 27 def "No #{@name} blueprint defined for class #{@klass.name}" end |