Class: Rux::AST::TextNode

Inherits:
Object
  • Object
show all
Defined in:
lib/rux/ast/text_node.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text) ⇒ TextNode



8
9
10
# File 'lib/rux/ast/text_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/rux/ast/text_node.rb', line 6

def text
  @text
end

Instance Method Details

#accept(visitor) ⇒ Object



12
13
14
# File 'lib/rux/ast/text_node.rb', line 12

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