Class: Baba::Expr::Variable
- Inherits:
-
Object
- Object
- Baba::Expr::Variable
- Defined in:
- lib/baba/expr.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
-
#initialize(name) ⇒ Variable
constructor
A new instance of Variable.
Constructor Details
#initialize(name) ⇒ Variable
Returns a new instance of Variable.
150 151 152 |
# File 'lib/baba/expr.rb', line 150 def initialize(name) @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
148 149 150 |
# File 'lib/baba/expr.rb', line 148 def name @name end |
Instance Method Details
#accept(visitor) ⇒ Object
154 155 156 |
# File 'lib/baba/expr.rb', line 154 def accept(visitor) visitor.visit_variable_expr(self) end |