Exception: Restspec::Schema::Checker::NoAttributeError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/restspec/schema/checker.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object, attribute) ⇒ NoAttributeError

Returns a new instance of NoAttributeError.



36
37
38
39
# File 'lib/restspec/schema/checker.rb', line 36

def initialize(object, attribute)
  self.object = object
  self.attribute = attribute
end

Instance Attribute Details

#attributeObject

Returns the value of attribute attribute.



34
35
36
# File 'lib/restspec/schema/checker.rb', line 34

def attribute
  @attribute
end

#objectObject

Returns the value of attribute object.



34
35
36
# File 'lib/restspec/schema/checker.rb', line 34

def object
  @object
end

Instance Method Details

#to_sObject



41
42
43
# File 'lib/restspec/schema/checker.rb', line 41

def to_s
  "The object #{object} does not have the attribute #{attribute.name}"
end