Exception: Restspec::Schema::Checker::NoRootFoundError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object, schema) ⇒ NoRootFoundError

Returns a new instance of NoRootFoundError.



140
141
142
143
# File 'lib/restspec/schema/checker.rb', line 140

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

Instance Attribute Details

#objectObject

Returns the value of attribute object.



138
139
140
# File 'lib/restspec/schema/checker.rb', line 138

def object
  @object
end

#schemaObject

Returns the value of attribute schema.



138
139
140
# File 'lib/restspec/schema/checker.rb', line 138

def schema
  @schema
end

Instance Method Details

#to_sObject



145
146
147
# File 'lib/restspec/schema/checker.rb', line 145

def to_s
  "The object #{object}:#{object.class} does not contain a root called #{schema.root_name}"
end