Class: SyntaxTree::Index::ClassDefinition
- Inherits:
-
Object
- Object
- SyntaxTree::Index::ClassDefinition
- Defined in:
- lib/syntax_tree/index.rb
Overview
This entry represents a class definition using the class keyword.
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.
-
#superclass ⇒ Object
readonly
Returns the value of attribute superclass.
Instance Method Summary collapse
-
#initialize(nesting, name, superclass, location, comments) ⇒ ClassDefinition
constructor
A new instance of ClassDefinition.
Constructor Details
#initialize(nesting, name, superclass, location, comments) ⇒ ClassDefinition
Returns a new instance of ClassDefinition.
25 26 27 28 29 30 31 |
# File 'lib/syntax_tree/index.rb', line 25 def initialize(nesting, name, superclass, location, comments) @nesting = nesting @name = name @superclass = superclass @location = location @comments = comments end |
Instance Attribute Details
#comments ⇒ Object (readonly)
Returns the value of attribute comments.
23 24 25 |
# File 'lib/syntax_tree/index.rb', line 23 def comments @comments end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
23 24 25 |
# File 'lib/syntax_tree/index.rb', line 23 def location @location end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
23 24 25 |
# File 'lib/syntax_tree/index.rb', line 23 def name @name end |
#nesting ⇒ Object (readonly)
Returns the value of attribute nesting.
23 24 25 |
# File 'lib/syntax_tree/index.rb', line 23 def nesting @nesting end |
#superclass ⇒ Object (readonly)
Returns the value of attribute superclass.
23 24 25 |
# File 'lib/syntax_tree/index.rb', line 23 def superclass @superclass end |