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
-
(Boolean)
-
Parameters:
-
other
(Object
) --
def self.==(other) = other.is_a?(Class) && other <= TerminalShop::BooleanModel
def self.===(other) = other == true || other == false
-
(Boolean)
-
Parameters:
-
other
(Object
) --
def self.===(other) = other == true || other == false
def try_strict_coerce(value)
-
(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