Class: Rux::AST::StringNode

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(str) ⇒ StringNode

Returns a new instance of StringNode.



6
7
8
# File 'lib/rux/ast/string_node.rb', line 6

def initialize(str)
  @str = str
end

Instance Attribute Details

#strObject (readonly)

Returns the value of attribute str.



4
5
6
# File 'lib/rux/ast/string_node.rb', line 4

def str
  @str
end

Instance Method Details

#accept(visitor) ⇒ Object



10
11
12
# File 'lib/rux/ast/string_node.rb', line 10

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