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.



113
114
115
116
# File 'lib/restspec/schema/checker.rb', line 113

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

Instance Attribute Details

#attributeObject

Returns the value of attribute attribute.



111
112
113
# File 'lib/restspec/schema/checker.rb', line 111

def attribute
  @attribute
end

#objectObject

Returns the value of attribute object.



111
112
113
# File 'lib/restspec/schema/checker.rb', line 111

def object
  @object
end

Instance Method Details

#to_sObject



118
119
120
# File 'lib/restspec/schema/checker.rb', line 118

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