Class: Cel::ListType
Instance Attribute Summary collapse
-
#element_type ⇒ Object
Returns the value of attribute element_type.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #cast(value) ⇒ Object
- #get(idx) ⇒ Object
-
#initialize(type_list) ⇒ ListType
constructor
A new instance of ListType.
Methods inherited from Type
Constructor Details
Instance Attribute Details
#element_type ⇒ Object
Returns the value of attribute element_type.
52 53 54 |
# File 'lib/cel/ast/types.rb', line 52 def element_type @element_type end |
Instance Method Details
#==(other) ⇒ Object
64 65 66 |
# File 'lib/cel/ast/types.rb', line 64 def ==(other) other == :list || super end |
#cast(value) ⇒ Object
68 69 70 |
# File 'lib/cel/ast/types.rb', line 68 def cast(value) List.new(value) end |
#get(idx) ⇒ Object
60 61 62 |
# File 'lib/cel/ast/types.rb', line 60 def get(idx) @type_list[idx] end |