Class: Rampi::Var
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
-
#initialize(name) ⇒ Var
constructor
A new instance of Var.
- #to_s ⇒ Object (also: #inspect)
Methods inherited from Node
#!=, #%, #&, #*, #**, #+, #-, #-@, #/, #<, #<<, #<=, #==, #>, #>=, #>>, #^, #|, #~
Constructor Details
#initialize(name) ⇒ Var
Returns a new instance of Var.
86 87 88 |
# File 'lib/rampi/node.rb', line 86 def initialize(name) @name = name end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
84 85 86 |
# File 'lib/rampi/node.rb', line 84 def name @name end |
Instance Method Details
#accept(visitor) ⇒ Object
95 96 97 |
# File 'lib/rampi/node.rb', line 95 def accept(visitor) visitor.visit_var(self) end |
#to_s ⇒ Object Also known as: inspect
90 91 92 |
# File 'lib/rampi/node.rb', line 90 def to_s name.to_s end |