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, quote_type, pos) ⇒ StringNode

Returns a new instance of StringNode.



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

def initialize(str, quote_type, pos)
  @str = str
  @quote_type = quote_type
  @pos = pos
end

Instance Attribute Details

#posObject (readonly)

Returns the value of attribute pos.



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

def pos
  @pos
end

#quote_typeObject (readonly)

Returns the value of attribute quote_type.



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

def quote_type
  @quote_type
end

#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



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

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