class TerminalShop::BooleanModel

Ruby has no Boolean class; this is something for models to refer to.
@abstract
@private

def self.==(other) = other.is_a?(Class) && other <= TerminalShop::BooleanModel

Returns:
  • (Boolean) -

Parameters:
  • other (Object) --
def self.==(other) = other.is_a?(Class) && other <= TerminalShop::BooleanModel

def self.===(other) = other == true || other == false

Returns:
  • (Boolean) -

Parameters:
  • other (Object) --
def self.===(other) = other == true || other == false

def try_strict_coerce(value)

Returns:
  • (Array(true, Object, nil), Array(false, Boolean, Integer)) -

Parameters:
  • value (Object) --

Other tags:
    Private: -
def try_strict_coerce(value)
  case value
  in true | false
    [true, value, 1]
  else
    [false, false, 0]
  end
end