Class: Cel::List

Inherits:
Literal
  • Object
show all
Defined in:
lib/cel/ast/elements.rb

Instance Attribute Summary

Attributes inherited from Literal

#type, #value

Instance Method Summary collapse

Methods inherited from Literal

#==, to_cel_type

Constructor Details

#initialize(value) ⇒ List

Returns a new instance of List.



220
221
222
223
224
225
# File 'lib/cel/ast/elements.rb', line 220

def initialize(value)
  value = value.map do |v|
    Literal.to_cel_type(v)
  end
  super(ListType.new(value), value)
end

Instance Method Details

#to_aryObject



227
228
229
# File 'lib/cel/ast/elements.rb', line 227

def to_ary
  [self]
end