Class: Fdlint::Parser::JS::FunctionExpression

Inherits:
Expression show all
Defined in:
lib/fdlint/parser/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.



249
250
251
252
# File 'lib/fdlint/parser/js/struct.rb', line 249

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.



245
246
247
# File 'lib/fdlint/parser/js/struct.rb', line 245

def body
  @body
end