Class: Baba::Stmt::Return
- Inherits:
-
Object
- Object
- Baba::Stmt::Return
- Defined in:
- lib/baba/stmt.rb
Instance Attribute Summary collapse
-
#keyword ⇒ Object
readonly
Returns the value of attribute keyword.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
-
#initialize(keyword, value) ⇒ Return
constructor
A new instance of Return.
Constructor Details
#initialize(keyword, value) ⇒ Return
Returns a new instance of Return.
90 91 92 |
# File 'lib/baba/stmt.rb', line 90 def initialize(keyword, value) @keyword = keyword; @value = value end |
Instance Attribute Details
#keyword ⇒ Object (readonly)
Returns the value of attribute keyword.
88 89 90 |
# File 'lib/baba/stmt.rb', line 88 def keyword @keyword end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
88 89 90 |
# File 'lib/baba/stmt.rb', line 88 def value @value end |
Instance Method Details
#accept(visitor) ⇒ Object
94 95 96 |
# File 'lib/baba/stmt.rb', line 94 def accept(visitor) visitor.visit_return_stmt(self) end |