Class: SyntaxTree::Index::ModuleDefinition

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

Overview

This entry represents a module definition using the module keyword.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(nesting, name, location, comments) ⇒ ModuleDefinition

Returns a new instance of ModuleDefinition.



50
51
52
53
54
55
# File 'lib/syntax_tree/index.rb', line 50

def initialize(nesting, name, location, comments)
  @nesting = nesting
  @name = name
  @location = location
  @comments = comments
end

Instance Attribute Details

#commentsObject (readonly)

Returns the value of attribute comments.



48
49
50
# File 'lib/syntax_tree/index.rb', line 48

def comments
  @comments
end

#locationObject (readonly)

Returns the value of attribute location.



48
49
50
# File 'lib/syntax_tree/index.rb', line 48

def location
  @location
end

#nameObject (readonly)

Returns the value of attribute name.



48
49
50
# File 'lib/syntax_tree/index.rb', line 48

def name
  @name
end

#nestingObject (readonly)

Returns the value of attribute nesting.



48
49
50
# File 'lib/syntax_tree/index.rb', line 48

def nesting
  @nesting
end