Class: FinchAPI::Type::BooleanModel Abstract Private
- Inherits:
-
Object
- Object
- FinchAPI::Type::BooleanModel
- Extended by:
- Converter
- Defined in:
- lib/finch-api/type/boolean_model.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.
Ruby has no Boolean class; this is something for models to refer to.
Class Method Summary collapse
- .==(other) ⇒ Boolean private
- .===(other) ⇒ Boolean private
- .coerce(value, state:) ⇒ Boolean, Object private
- .dump(value) ⇒ Boolean, Object private
Methods included from Converter
Class Method Details
.==(other) ⇒ Boolean
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.
21 |
# File 'lib/finch-api/type/boolean_model.rb', line 21 def self.==(other) = other.is_a?(Class) && other <= FinchAPI::BooleanModel |
.===(other) ⇒ Boolean
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.
16 |
# File 'lib/finch-api/type/boolean_model.rb', line 16 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.
37 38 39 40 |
# File 'lib/finch-api/type/boolean_model.rb', line 37 def coerce(value, state:) state.fetch(:exactness)[value == true || value == false ? :yes : :no] += 1 value end |
.dump(value) ⇒ 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.
6 |
# File 'lib/finch-api/type/boolean_model.rb', line 6 def dump(value) = super |