Class: ORB::AST::NewlineNode
- Inherits:
-
AbstractNode
- Object
- AbstractNode
- ORB::AST::NewlineNode
- Defined in:
- lib/orb/ast/newline_node.rb
Instance Attribute Summary collapse
-
#text ⇒ Object
Returns the value of attribute text.
Attributes inherited from AbstractNode
#attributes, #children, #errors
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(token) ⇒ NewlineNode
constructor
A new instance of NewlineNode.
- #render(_context) ⇒ Object
Methods inherited from AbstractNode
Constructor Details
#initialize(token) ⇒ NewlineNode
Returns a new instance of NewlineNode.
8 9 10 11 |
# File 'lib/orb/ast/newline_node.rb', line 8 def initialize(token) super @text = token.value end |
Instance Attribute Details
#text ⇒ Object
Returns the value of attribute text.
6 7 8 |
# File 'lib/orb/ast/newline_node.rb', line 6 def text @text end |
Instance Method Details
#==(other) ⇒ Object
17 18 19 |
# File 'lib/orb/ast/newline_node.rb', line 17 def ==(other) super && @text == other.text end |
#render(_context) ⇒ Object
13 14 15 |
# File 'lib/orb/ast/newline_node.rb', line 13 def render(_context) @text end |