Module: Telnyx::Models::AI::Expression
- Extended by:
- Internal::Type::Union
- Defined in:
- lib/telnyx/models/ai/expression.rb,
sig/telnyx/models/ai/expression.rbs
Overview
A node in a deterministic expression AST. Exactly one variant is selected by the
type discriminator. Terminal variants (number_literal, string_literal,
bool_literal, variable) bottom out the recursion; arithmetic, bool_op,
and comparison nest further sub-expressions.
Extracted into a single named schema so the recursive union is defined once (was previously inlined at every operand site).
Defined Under Namespace
Classes: BoolLiteral, NumberLiteral, StringLiteral, Variable
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(value:, type: :number_literal) ⇒ Object
Constant numeric value (float; integers are accepted and stored as float).
- #self?.variants ⇒ ::Array[Telnyx::Models::AI::expression]
Methods included from Internal::Type::Union
==, ===, coerce, derefed_variants, dump, hash, inspect, to_sorbet_type, variants
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Class Method Details
.variants ⇒ Array(Telnyx::Models::AI::ComparisonExpression, Telnyx::Models::AI::BooleanOpExpression, Telnyx::Models::AI::ArithmeticExpression, Telnyx::Models::AI::Expression::Variable, Telnyx::Models::AI::Expression::StringLiteral, Telnyx::Models::AI::Expression::NumberLiteral, Telnyx::Models::AI::Expression::BoolLiteral)
|
|
# File 'lib/telnyx/models/ai/expression.rb', line 133
|
Instance Method Details
#initialize(value:, type: :number_literal) ⇒ Object
Constant numeric value (float; integers are accepted and stored as float).
|
|
# File 'lib/telnyx/models/ai/expression.rb', line 62
|
#self?.variants ⇒ ::Array[Telnyx::Models::AI::expression]
64 |
# File 'sig/telnyx/models/ai/expression.rbs', line 64
def self?.variants: -> ::Array[Telnyx::Models::AI::expression]
|