Class: Deadfire::FrontEnd::NewlineNode

Inherits:
BaseNode
  • Object
show all
Defined in:
lib/deadfire/front_end/newline_node.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text) ⇒ NewlineNode

Returns a new instance of NewlineNode.



8
9
10
# File 'lib/deadfire/front_end/newline_node.rb', line 8

def initialize(text)
  @text = text
end

Instance Attribute Details

#textObject (readonly)

Returns the value of attribute text.



6
7
8
# File 'lib/deadfire/front_end/newline_node.rb', line 6

def text
  @text
end

Instance Method Details

#accept(visitor) ⇒ Object



12
13
14
# File 'lib/deadfire/front_end/newline_node.rb', line 12

def accept(visitor)
  visitor.visit_newline_node(self)
end