Class: Cel::Identifier
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Cel::Identifier
- Defined in:
- lib/cel/ast/elements.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(identifier) ⇒ Identifier
constructor
A new instance of Identifier.
Constructor Details
#initialize(identifier) ⇒ Identifier
Returns a new instance of Identifier.
14 15 16 17 18 |
# File 'lib/cel/ast/elements.rb', line 14 def initialize(identifier) @id = identifier @type = TYPES[:any] super(@id) end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
10 11 12 |
# File 'lib/cel/ast/elements.rb', line 10 def id @id end |
#type ⇒ Object
Returns the value of attribute type.
12 13 14 |
# File 'lib/cel/ast/elements.rb', line 12 def type @type end |
Instance Method Details
#==(other) ⇒ Object
20 21 22 |
# File 'lib/cel/ast/elements.rb', line 20 def ==(other) super || other.to_s == @id.to_s end |