Class: FinchAPI::Internal::Type::Boolean Abstract Private
- Inherits:
-
Object
- Object
- FinchAPI::Internal::Type::Boolean
- Extended by:
- Converter
- Defined in:
- lib/finch_api/internal/type/boolean.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
This class is abstract.
Ruby has no Boolean class; this is something for models to refer to.
Class Method Summary collapse
- .==(other) ⇒ Boolean
- .===(other) ⇒ Boolean
- .coerce(value, state:) ⇒ Boolean, Object private
- .dump(value, state: ) ⇒ Boolean, Object private
Methods included from Converter
coerce, dump, inspect, inspect, type_info
Methods included from Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!
Class Method Details
.==(other) ⇒ Boolean
28 |
# File 'lib/finch_api/internal/type/boolean.rb', line 28 def self.==(other) = other.is_a?(Class) && other <= FinchAPI::Internal::Type::Boolean |
.===(other) ⇒ Boolean
21 |
# File 'lib/finch_api/internal/type/boolean.rb', line 21 def self.===(other) = other == true || other == false |
.coerce(value, state:) ⇒ Boolean, Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
44 45 46 47 |
# File 'lib/finch_api/internal/type/boolean.rb', line 44 def coerce(value, state:) state.fetch(:exactness)[value == true || value == false ? :yes : :no] += 1 value end |
.dump(value, state: ) ⇒ Boolean, Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
|
|
# File 'lib/finch_api/internal/type/boolean.rb', line 49
|