Class: XRay::JS::FunctionExpression

Inherits:
Expression show all
Defined in:
lib/js/struct.rb

Instance Attribute Summary collapse

Attributes inherited from Element

#left, #right, #type

Instance Method Summary collapse

Methods inherited from Expression

#left_hand=, #left_hand?

Methods inherited from Element

#contains?, #position, #text

Constructor Details

#initialize(func) ⇒ FunctionExpression

Returns a new instance of FunctionExpression.



241
242
243
244
# File 'lib/js/struct.rb', line 241

def initialize(func)
  super 'function', func.name, func.parameters, func.position
  @body = func.body
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



237
238
239
# File 'lib/js/struct.rb', line 237

def body
  @body
end