rubysolo/dentaku

Isn't `add_functions` supposed to be class method?

sabbiu opened this issue · 1 comments

sabbiu commented

The code given here

https://github.com/rubysolo/dentaku/blob/main/lib/dentaku/calculator.rb#L38-L41

def add_functions(fns)
  fns.each { |(name, type, body, callback)| add_function(name, type, body, callback) }
  self
end

Similar to how add_function is a class method, I was thinking if add_functions should also be a class method.

How to initialize multiple functions at once?

Thanks for the report!