Class: CSVPlusPlus::Language::Entities::Variable
- Defined in:
- lib/csv_plus_plus/language/entities/variable.rb
Overview
A reference to a variable
Instance Attribute Summary
Attributes inherited from Entity
Instance Method Summary collapse
-
#==(other) ⇒ Object
.
-
#initialize(id) ⇒ Variable
constructor
initialize.
-
#to_s ⇒ Object
to_s.
Methods inherited from Entity
#method_missing, #respond_to_missing?
Constructor Details
#initialize(id) ⇒ Variable
initialize
9 10 11 |
# File 'lib/csv_plus_plus/language/entities/variable.rb', line 9 def initialize(id) super(:variable, id:) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class CSVPlusPlus::Language::Entities::Entity
Instance Method Details
#==(other) ⇒ Object
19 20 21 |
# File 'lib/csv_plus_plus/language/entities/variable.rb', line 19 def ==(other) super && id == other.id end |
#to_s ⇒ Object
to_s
14 15 16 |
# File 'lib/csv_plus_plus/language/entities/variable.rb', line 14 def to_s "$$#{@id}" end |