Class: Baba::Expr::Literal
- Inherits:
-
Object
- Object
- Baba::Expr::Literal
- Defined in:
- lib/baba/expr.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
-
#initialize(value) ⇒ Literal
constructor
A new instance of Literal.
Constructor Details
#initialize(value) ⇒ Literal
Returns a new instance of Literal.
78 79 80 |
# File 'lib/baba/expr.rb', line 78 def initialize(value) @value = value end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
76 77 78 |
# File 'lib/baba/expr.rb', line 76 def value @value end |
Instance Method Details
#accept(visitor) ⇒ Object
82 83 84 |
# File 'lib/baba/expr.rb', line 82 def accept(visitor) visitor.visit_literal_expr(self) end |