Class: Cel::MapType
Instance Attribute Summary collapse
-
#element_type ⇒ Object
Returns the value of attribute element_type.
Instance Method Summary collapse
- #get(attrib) ⇒ Object
-
#initialize(type_map) ⇒ MapType
constructor
A new instance of MapType.
Methods inherited from Type
Constructor Details
Instance Attribute Details
#element_type ⇒ Object
Returns the value of attribute element_type.
58 59 60 |
# File 'lib/cel/ast/types.rb', line 58 def element_type @element_type end |
Instance Method Details
#get(attrib) ⇒ Object
66 67 68 69 |
# File 'lib/cel/ast/types.rb', line 66 def get(attrib) _, value = @type_map.find { |k, _| k == attrib.to_s } value end |