Class: SyntaxTree::Reflection::Node

Inherits:
Object
  • Object
show all
Defined in:
lib/syntax_tree/reflection.rb

Overview

This class represents one of our nodes in the tree. We’re going to use it as a placeholder for collecting all of the various places that nodes are used.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, comment, attributes) ⇒ Node

Returns a new instance of Node.



143
144
145
146
147
# File 'lib/syntax_tree/reflection.rb', line 143

def initialize(name, comment, attributes)
  @name = name
  @comment = comment
  @attributes = attributes
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



141
142
143
# File 'lib/syntax_tree/reflection.rb', line 141

def attributes
  @attributes
end

#commentObject (readonly)

Returns the value of attribute comment.



141
142
143
# File 'lib/syntax_tree/reflection.rb', line 141

def comment
  @comment
end

#nameObject (readonly)

Returns the value of attribute name.



141
142
143
# File 'lib/syntax_tree/reflection.rb', line 141

def name
  @name
end