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

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

Instance Method Details

#initialize(value:, type: :number_literal) ⇒ Object

Constant numeric value (float; integers are accepted and stored as float).

Parameters:

  • value (Float)

    Literal numeric value.

  • type (Symbol, :number_literal) (defaults to: :number_literal)


# File 'lib/telnyx/models/ai/expression.rb', line 62

#self?.variants::Array[Telnyx::Models::AI::expression]

Returns:

  • (::Array[Telnyx::Models::AI::expression])


64
# File 'sig/telnyx/models/ai/expression.rbs', line 64

def self?.variants: -> ::Array[Telnyx::Models::AI::expression]