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.



289
290
291
292
293
294
# File 'lib/cel/ast/elements.rb', line 289

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



296
297
298
# File 'lib/cel/ast/elements.rb', line 296

def to_ary
  [self]
end