Class: Baba::Expr::Assign
- Inherits:
-
Object
- Object
- Baba::Expr::Assign
- Defined in:
- lib/baba/expr.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
-
#initialize(name, value) ⇒ Assign
constructor
A new instance of Assign.
Constructor Details
#initialize(name, value) ⇒ Assign
Returns a new instance of Assign.
6 7 8 |
# File 'lib/baba/expr.rb', line 6 def initialize(name, value) @name = name; @value = value end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/baba/expr.rb', line 4 def name @name end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
4 5 6 |
# File 'lib/baba/expr.rb', line 4 def value @value end |
Instance Method Details
#accept(visitor) ⇒ Object
10 11 12 |
# File 'lib/baba/expr.rb', line 10 def accept(visitor) visitor.visit_assign_expr(self) end |