Class: CSVPlusPlus::Entities::Variable
- Extended by:
- T::Sig
- 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
- #evaluate(_runtime) ⇒ ::String
-
#initialize(id) ⇒ Variable
constructor
A new instance of Variable.
Constructor Details
#initialize(id) ⇒ Variable
Returns a new instance of Variable.
14 15 16 |
# File 'lib/csv_plus_plus/entities/variable.rb', line 14 def initialize(id) super(::CSVPlusPlus::Entities::Type::Variable, id:) end |
Instance Method Details
#==(other) ⇒ boolean
30 31 32 33 34 |
# File 'lib/csv_plus_plus/entities/variable.rb', line 30 def ==(other) return false unless super other.is_a?(self.class) && @id == other.id end |
#evaluate(_runtime) ⇒ ::String
22 23 24 |
# File 'lib/csv_plus_plus/entities/variable.rb', line 22 def evaluate(_runtime) "$$#{@id}" end |