Method: MultiEval#method_missing

Defined in:
lib/formula_eval/multi_eval.rb

#method_missing(sym, *args, &b) ⇒ Object



28
29
30
31
32
33
34
35
36
37
38
# File 'lib/formula_eval/multi_eval.rb', line 28

def method_missing(sym,*args,&b)
  objs.each do |obj|
    if obj.smart_respond_to?(sym,args)
      res = obj.send(sym,*args,&b)
      #return MultiEval.new(:objs => [res]+without_obj(obj)) #if res
      return res if res
    end
  end
  raise 'none respond'
  objs.first.send(sym,*args,&b)
end