Class: Restspec::Schema::Checker::ObjectChecker

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

Instance Method Summary collapse

Instance Method Details

#missed_key?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/restspec/schema/checker.rb', line 24

def missed_key?
  !object.has_key?(attribute.name)
end

#wrong_type?Boolean

Returns:

  • (Boolean)


28
29
30
# File 'lib/restspec/schema/checker.rb', line 28

def wrong_type?
  !attribute.type.totally_valid?(attribute, object.fetch(attribute.name))
end