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