Class: SyntaxTree::Reflection::Node
- Inherits:
-
Object
- Object
- SyntaxTree::Reflection::Node
- 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
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#comment ⇒ Object
readonly
Returns the value of attribute comment.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#visitor_method ⇒ Object
readonly
Returns the value of attribute visitor_method.
Instance Method Summary collapse
-
#initialize(name, comment, attributes, visitor_method) ⇒ Node
constructor
A new instance of Node.
Constructor Details
#initialize(name, comment, attributes, visitor_method) ⇒ Node
Returns a new instance of Node.
143 144 145 146 147 148 |
# File 'lib/syntax_tree/reflection.rb', line 143 def initialize(name, comment, attributes, visitor_method) @name = name @comment = comment @attributes = attributes @visitor_method = visitor_method end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
141 142 143 |
# File 'lib/syntax_tree/reflection.rb', line 141 def attributes @attributes end |
#comment ⇒ Object (readonly)
Returns the value of attribute comment.
141 142 143 |
# File 'lib/syntax_tree/reflection.rb', line 141 def comment @comment end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
141 142 143 |
# File 'lib/syntax_tree/reflection.rb', line 141 def name @name end |
#visitor_method ⇒ Object (readonly)
Returns the value of attribute visitor_method.
141 142 143 |
# File 'lib/syntax_tree/reflection.rb', line 141 def visitor_method @visitor_method end |