Class: Wood::Nodes::Function::Definition

Inherits:
Node
  • Object
show all
Defined in:
lib/wood/nodes/function.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#scopeObject

Returns the value of attribute scope.



20
21
22
# File 'lib/wood/nodes/function.rb', line 20

def scope
  @scope
end

Instance Method Details

#setupObject



22
23
24
25
# File 'lib/wood/nodes/function.rb', line 22

def setup
  @args = args || []
  @body = body || CodeBlock[pos: pos]
end