Class: AbstractSyntaxTreeKit::Node::DEFS

Inherits:
AbstractSyntaxTreeKit::Node show all
Defined in:
lib/astkit/node/defs.rb

Instance Attribute Summary collapse

Attributes inherited from AbstractSyntaxTreeKit::Node

#children, #condition, #els, #first_column, #first_lineno, #last_column, #last_lineno, #type

Instance Method Summary collapse

Constructor Details

#initialize(node:, receiver:, name:, body:) ⇒ DEFS

Returns a new instance of DEFS.



6
7
8
9
10
11
# File 'lib/astkit/node/defs.rb', line 6

def initialize(node:, receiver:, name:, body:)
  super(node)
  @receiver = receiver
  @name = name
  @body = body
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



4
5
6
# File 'lib/astkit/node/defs.rb', line 4

def body
  @body
end

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/astkit/node/defs.rb', line 4

def name
  @name
end

#receiverObject (readonly)

Returns the value of attribute receiver.



4
5
6
# File 'lib/astkit/node/defs.rb', line 4

def receiver
  @receiver
end