Class: CSVPlusPlus::Entities::Variable
- Defined in:
- lib/csv_plus_plus/entities/variable.rb
Overview
TODO: get rid of this I think - everything will just be References
A reference to a variable
Instance Attribute Summary
Attributes inherited from Entity
Instance Method Summary collapse
- #==(other) ⇒ boolean
-
#initialize(id) ⇒ Variable
constructor
A new instance of Variable.
- #to_s ⇒ String
Methods inherited from Entity
#method_missing, #respond_to_missing?
Constructor Details
#initialize(id) ⇒ Variable
Returns a new instance of Variable.
10 11 12 |
# File 'lib/csv_plus_plus/entities/variable.rb', line 10 def initialize(id) super(:variable, id:) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class CSVPlusPlus::Entities::Entity
Instance Method Details
#==(other) ⇒ boolean
20 21 22 |
# File 'lib/csv_plus_plus/entities/variable.rb', line 20 def ==(other) super && id == other.id end |
#to_s ⇒ String
15 16 17 |
# File 'lib/csv_plus_plus/entities/variable.rb', line 15 def to_s "$$#{@id}" end |