Class: Rux::AST::RubyAttrNode

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ruby_node) ⇒ RubyAttrNode

Returns a new instance of RubyAttrNode.



7
8
9
# File 'lib/rux/ast/ruby_attr_node.rb', line 7

def initialize(ruby_node)
  @ruby_node = ruby_node
end

Instance Attribute Details

#ruby_nodeObject (readonly)

Returns the value of attribute ruby_node.



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

def ruby_node
  @ruby_node
end

#tag_nodeObject

Returns the value of attribute tag_node.



5
6
7
# File 'lib/rux/ast/ruby_attr_node.rb', line 5

def tag_node
  @tag_node
end

Instance Method Details

#accept(visitor) ⇒ Object



15
16
17
# File 'lib/rux/ast/ruby_attr_node.rb', line 15

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

#codeObject



11
12
13
# File 'lib/rux/ast/ruby_attr_node.rb', line 11

def code
  ruby_node.code
end

#nameObject



23
24
25
# File 'lib/rux/ast/ruby_attr_node.rb', line 23

def name
  nil
end

#ruby_code?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/rux/ast/ruby_attr_node.rb', line 19

def ruby_code?
  true
end