Class: SyntaxTree::Index::SingletonMethodDefinition

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

Overview

This entry represents a singleton method definition using the def keyword with a specified target.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of SingletonMethodDefinition.



75
76
77
78
79
80
# File 'lib/syntax_tree/index.rb', line 75

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.



73
74
75
# File 'lib/syntax_tree/index.rb', line 73

def comments
  @comments
end

#locationObject (readonly)

Returns the value of attribute location.



73
74
75
# File 'lib/syntax_tree/index.rb', line 73

def location
  @location
end

#nameObject (readonly)

Returns the value of attribute name.



73
74
75
# File 'lib/syntax_tree/index.rb', line 73

def name
  @name
end

#nestingObject (readonly)

Returns the value of attribute nesting.



73
74
75
# File 'lib/syntax_tree/index.rb', line 73

def nesting
  @nesting
end