Class: HashSchema::BooleanSchema

Inherits:
Schema
  • Object
show all
Defined in:
lib/hash_schema.rb

Instance Attribute Summary

Attributes inherited from Schema

#chain

Instance Method Summary collapse

Methods inherited from Schema

#expectation, #initialize, #interpret, #pretty_validate

Constructor Details

This class inherits a constructor from HashSchema::Schema

Instance Method Details

#validate(data) ⇒ Object



119
120
121
122
# File 'lib/hash_schema.rb', line 119

def validate(data)
  return if data.is_a?(TrueClass) || data.is_a?(FalseClass)
  error(data)
end