Method: Code::Object::Function#call

Defined in:
lib/code/object/function.rb

#call(**args) ⇒ Object



21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/code/object/function.rb', line 21

def call(**args)
  code_operator = args.fetch(:operator, nil).to_code
  code_arguments = args.fetch(:arguments, List.new).to_code
  globals = multi_fetch(args, *GLOBALS)

  case code_operator.to_s
  when "", "call"
    sig(args) { signature_for_call }
    code_call(*code_arguments.raw, **globals)
  else
    super
  end
end