class Axiom::Types::Boolean

Represents a boolean type

Private Class Methods

infer_from_primitive_class(object) click to toggle source

Infer the type if the primitive class matches

@param [Object] object

@return [Class<Axiom::Types::Boolean>]

returned if the primitive class matches

@return [nil]

returned if the primitive class does not match

@api private

# File lib/axiom/types/boolean.rb, line 21
def self.infer_from_primitive_class(object)
  case object
  when TrueClass.singleton_class, FalseClass.singleton_class
    self
  end
end