Exception: Pickle::Session::ModelNotKnownError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Pickle::Session::ModelNotKnownError
- Defined in:
- lib/pickle/session.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, message = nil) ⇒ ModelNotKnownError
constructor
A new instance of ModelNotKnownError.
- #to_s ⇒ Object
Constructor Details
#initialize(name, message = nil) ⇒ ModelNotKnownError
Returns a new instance of ModelNotKnownError.
7 8 9 10 |
# File 'lib/pickle/session.rb', line 7 def initialize(name, = nil) @name = name @message = || "The model: '#{name}' is not known in this scenario. Use #create_model to create, or #find_model to find, and store a reference in this scenario." end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/pickle/session.rb', line 5 def name @name end |
Instance Method Details
#to_s ⇒ Object
12 13 14 |
# File 'lib/pickle/session.rb', line 12 def to_s @message end |