Class: Hako::Schema::Boolean

Inherits:
Object
  • Object
show all
Defined in:
lib/hako/schema/boolean.rb

Instance Method Summary collapse

Instance Method Details

#same?(x, y) ⇒ Boolean

Returns:



10
11
12
# File 'lib/hako/schema/boolean.rb', line 10

def same?(x, y)
  x == y
end

#valid?(object) ⇒ Boolean

Returns:



6
7
8
# File 'lib/hako/schema/boolean.rb', line 6

def valid?(object)
  object.is_a?(FalseClass) || object.is_a?(TrueClass)
end