Class: Refract::DefNode
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#name ⇒ Object
Returns the value of attribute name.
-
#parameters ⇒ Object
Returns the value of attribute parameters.
-
#receiver ⇒ Object
Returns the value of attribute receiver.
Instance Method Summary collapse
-
#initialize(prism_node: nil, name:, receiver:, parameters:, body:) ⇒ DefNode
constructor
A new instance of DefNode.
Methods inherited from Node
#accept, #copy, #start_line, #type, type
Constructor Details
#initialize(prism_node: nil, name:, receiver:, parameters:, body:) ⇒ DefNode
Returns a new instance of DefNode.
5 6 7 8 9 10 11 12 |
# File 'lib/refract/nodes/def_node.rb', line 5 def initialize(prism_node: nil, name:, receiver:, parameters:, body:) @prism_node = prism_node => Prism::Node | nil @name = name @receiver = receiver @parameters = parameters @body = body freeze end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
14 15 16 |
# File 'lib/refract/nodes/def_node.rb', line 14 def body @body end |
#name ⇒ Object
Returns the value of attribute name.
14 15 16 |
# File 'lib/refract/nodes/def_node.rb', line 14 def name @name end |
#parameters ⇒ Object
Returns the value of attribute parameters.
14 15 16 |
# File 'lib/refract/nodes/def_node.rb', line 14 def parameters @parameters end |
#receiver ⇒ Object
Returns the value of attribute receiver.
14 15 16 |
# File 'lib/refract/nodes/def_node.rb', line 14 def receiver @receiver end |