Class: SyntaxTree::Index::ClassDefinition

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

Overview

This entry represents a class definition using the class keyword.

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#commentsObject (readonly)

Returns the value of attribute comments.



23
24
25
# File 'lib/syntax_tree/index.rb', line 23

def comments
  @comments
end

#locationObject (readonly)

Returns the value of attribute location.



23
24
25
# File 'lib/syntax_tree/index.rb', line 23

def location
  @location
end

#nameObject (readonly)

Returns the value of attribute name.



23
24
25
# File 'lib/syntax_tree/index.rb', line 23

def name
  @name
end

#nestingObject (readonly)

Returns the value of attribute nesting.



23
24
25
# File 'lib/syntax_tree/index.rb', line 23

def nesting
  @nesting
end

#superclassObject (readonly)

Returns the value of attribute superclass.



23
24
25
# File 'lib/syntax_tree/index.rb', line 23

def superclass
  @superclass
end