Exception: Xampl::NotXamplPersistedObject
- Inherits:
-
Exception
- Object
- Exception
- Xampl::NotXamplPersistedObject
- Defined in:
- lib/xamplr/exceptions.rb
Instance Attribute Summary collapse
-
#klass ⇒ Object
readonly
Returns the value of attribute klass.
Instance Method Summary collapse
-
#initialize(thing = nil) ⇒ NotXamplPersistedObject
constructor
A new instance of NotXamplPersistedObject.
- #message ⇒ Object
Constructor Details
#initialize(thing = nil) ⇒ NotXamplPersistedObject
Returns a new instance of NotXamplPersistedObject.
85 86 87 |
# File 'lib/xamplr/exceptions.rb', line 85 def initialize(thing=nil) @klass = thing.class.name end |
Instance Attribute Details
#klass ⇒ Object (readonly)
Returns the value of attribute klass.
83 84 85 |
# File 'lib/xamplr/exceptions.rb', line 83 def klass @klass end |
Instance Method Details
#message ⇒ Object
89 90 91 |
# File 'lib/xamplr/exceptions.rb', line 89 def "require a XamplPersistedObject, got a #{ klass }" end |