Module: Equation::MethodCall4

Defined in:
lib/equation_grammar.rb

Instance Method Summary collapse

Instance Method Details

#value(ctx:) ⇒ Object



1023
1024
1025
1026
1027
1028
1029
1030
1031
# File 'lib/equation_grammar.rb', line 1023

def value(ctx:)
  arguments = []
  arguments << args.arg0.value(ctx: ctx) if args.arg0.respond_to?(:value)
  args.argN.elements.each{|argN|
    arguments << argN.elements[3].value(ctx: ctx) if args.arg0.respond_to?(:value)
  }

  ctx.call(method: root.text_value, args: arguments)
end