Class: Estreet::CallExpression

Inherits:
Expression show all
Defined in:
lib/estreet/call_expression.rb

Direct Known Subclasses

NewExpression

Instance Attribute Summary

Attributes inherited from Node

#source_location

Instance Method Summary collapse

Methods inherited from Expression

#[], #call, coerce, #property, #to_expression, #to_statement

Methods inherited from Node

#as_json, #loc, #type

Constructor Details

#initialize(callee, arguments) ⇒ CallExpression

Returns a new instance of CallExpression.



3
4
5
6
# File 'lib/estreet/call_expression.rb', line 3

def initialize(callee, arguments)
  @callee = callee.to_expression
  @arguments = arguments.map {|arg| arg.to_expression }
end

Instance Method Details

#attributesObject



8
9
10
# File 'lib/estreet/call_expression.rb', line 8

def attributes
  super.merge(callee: @callee, arguments: @arguments)
end