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.
- #to_s ⇒ Object
Constructor Details
#initialize(identifier) ⇒ Identifier
Returns a new instance of Identifier.
27 28 29 30 31 |
# File 'lib/cel/ast/elements.rb', line 27 def initialize(identifier) @id = identifier @type = TYPES[:any] super(@id) end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
23 24 25 |
# File 'lib/cel/ast/elements.rb', line 23 def id @id end |
#type ⇒ Object
Returns the value of attribute type.
25 26 27 |
# File 'lib/cel/ast/elements.rb', line 25 def type @type end |
Instance Method Details
#==(other) ⇒ Object
33 34 35 |
# File 'lib/cel/ast/elements.rb', line 33 def ==(other) super || other.to_s == @id.to_s end |
#to_s ⇒ Object
37 38 39 |
# File 'lib/cel/ast/elements.rb', line 37 def to_s @id.to_s end |