Class: OpenAI::Internal::Type::Boolean Abstract Private
- Inherits:
-
Object
- Object
- OpenAI::Internal::Type::Boolean
- Extended by:
- Converter, Util::SorbetRuntimeSupport
- Defined in:
- lib/openai/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.
Ruby has no Boolean class; this is something for models to refer to.
Direct Known Subclasses
Class Method Summary collapse
- .==(other) ⇒ Boolean
- .===(other) ⇒ Boolean
- .coerce(value, state:) ⇒ Boolean, Object private
- .dump(value, state: ) ⇒ Boolean, Object private
- .to_sorbet_type ⇒ Object private
Methods included from Converter
coerce, dump, inspect, inspect, type_info
Methods included from Util::SorbetRuntimeSupport
const_missing, define_sorbet_constant!, sorbet_constant_defined?, to_sorbet_type
Class Method Details
.==(other) ⇒ Boolean
29 |
# File 'lib/openai/internal/type/boolean.rb', line 29 def self.==(other) = other.is_a?(Class) && other <= OpenAI::Internal::Type::Boolean |
.===(other) ⇒ Boolean
22 |
# File 'lib/openai/internal/type/boolean.rb', line 22 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.
45 46 47 48 |
# File 'lib/openai/internal/type/boolean.rb', line 45 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/openai/internal/type/boolean.rb', line 50
|
.to_sorbet_type ⇒ 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.
64 65 66 |
# File 'lib/openai/internal/type/boolean.rb', line 64 def to_sorbet_type T::Boolean end |