Class: SyntaxTree::Index::ConstantDefinition
- Inherits:
-
Object
- Object
- SyntaxTree::Index::ConstantDefinition
- Defined in:
- lib/syntax_tree/index.rb
Overview
This entry represents a constant assignment.
Instance Attribute Summary collapse
-
#comments ⇒ Object
readonly
Returns the value of attribute comments.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#nesting ⇒ Object
readonly
Returns the value of attribute nesting.
Instance Method Summary collapse
-
#initialize(nesting, name, location, comments) ⇒ ConstantDefinition
constructor
A new instance of ConstantDefinition.
Constructor Details
#initialize(nesting, name, location, comments) ⇒ ConstantDefinition
Returns a new instance of ConstantDefinition.
38 39 40 41 42 43 |
# File 'lib/syntax_tree/index.rb', line 38 def initialize(nesting, name, location, comments) @nesting = nesting @name = name @location = location @comments = comments end |
Instance Attribute Details
#comments ⇒ Object (readonly)
Returns the value of attribute comments.
36 37 38 |
# File 'lib/syntax_tree/index.rb', line 36 def comments @comments end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
36 37 38 |
# File 'lib/syntax_tree/index.rb', line 36 def location @location end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
36 37 38 |
# File 'lib/syntax_tree/index.rb', line 36 def name @name end |
#nesting ⇒ Object (readonly)
Returns the value of attribute nesting.
36 37 38 |
# File 'lib/syntax_tree/index.rb', line 36 def nesting @nesting end |