Exception: Restspec::Schema::Checker::InvalidationError
- Inherits:
-
StandardError
- Object
- StandardError
- Restspec::Schema::Checker::InvalidationError
- Defined in:
- lib/restspec/schema/checker.rb
Instance Attribute Summary collapse
-
#attribute ⇒ Object
Returns the value of attribute attribute.
-
#object ⇒ Object
Returns the value of attribute object.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(object, attribute) ⇒ InvalidationError
constructor
A new instance of InvalidationError.
- #to_s ⇒ Object
Constructor Details
#initialize(object, attribute) ⇒ InvalidationError
Returns a new instance of InvalidationError.
121 122 123 124 125 |
# File 'lib/restspec/schema/checker.rb', line 121 def initialize(object, attribute) self.object = object self.attribute = attribute self.value = object.fetch(attribute.name) end |
Instance Attribute Details
#attribute ⇒ Object
Returns the value of attribute attribute.
119 120 121 |
# File 'lib/restspec/schema/checker.rb', line 119 def attribute @attribute end |
#object ⇒ Object
Returns the value of attribute object.
119 120 121 |
# File 'lib/restspec/schema/checker.rb', line 119 def object @object end |
#value ⇒ Object
Returns the value of attribute value.
119 120 121 |
# File 'lib/restspec/schema/checker.rb', line 119 def value @value end |
Instance Method Details
#to_s ⇒ Object
127 128 129 |
# File 'lib/restspec/schema/checker.rb', line 127 def to_s "The property #{attribute.name} of #{object} was not valid according to the type #{attribute.type}" end |