Class: Rux::AST::RubyNode

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code) ⇒ RubyNode

Returns a new instance of RubyNode.



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

def initialize(code)
  @code = code
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



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

def code
  @code
end

Instance Method Details

#accept(visitor) ⇒ Object



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

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