Class: Melbourne::AST::DefineSingleton
- Defined in:
- lib/melbourne/ast/definitions.rb
Overview
A singleton method definition as in:
def object.method
end
Instance Attribute Summary collapse
-
#body ⇒ Object
The body of the defined method.
-
#name ⇒ Object
The receiver of the definition.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(line, receiver, name, block) ⇒ DefineSingleton
constructor
A new instance of DefineSingleton.
Methods inherited from Node
Constructor Details
#initialize(line, receiver, name, block) ⇒ DefineSingleton
Returns a new instance of DefineSingleton.
129 130 131 132 133 |
# File 'lib/melbourne/ast/definitions.rb', line 129 def initialize(line, receiver, name, block) @line = line @receiver = receiver @body = DefineSingletonScope.new line, name, block end |
Instance Attribute Details
#body ⇒ Object
The body of the defined method
127 128 129 |
# File 'lib/melbourne/ast/definitions.rb', line 127 def body @body end |
#name ⇒ Object
The receiver of the definition
123 124 125 |
# File 'lib/melbourne/ast/definitions.rb', line 123 def name @name end |