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.
126 127 128 129 130 |
# File 'lib/restspec/schema/checker.rb', line 126 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.
124 125 126 |
# File 'lib/restspec/schema/checker.rb', line 124 def attribute @attribute end |
#object ⇒ Object
Returns the value of attribute object.
124 125 126 |
# File 'lib/restspec/schema/checker.rb', line 124 def object @object end |
#value ⇒ Object
Returns the value of attribute value.
124 125 126 |
# File 'lib/restspec/schema/checker.rb', line 124 def value @value end |
Instance Method Details
#to_s ⇒ Object
132 133 134 |
# File 'lib/restspec/schema/checker.rb', line 132 def to_s "The property #{attribute.name} of #{object} was not valid according to the type #{attribute.type}" end |