Sha256: 9220de0140bface0d238ad788209596c0b1b226c46592777d5456877019454a6

Contents?: true

Size: 281 Bytes

Versions: 8

Compression:

Stored size: 281 Bytes

Contents

# import all functions from Ruby's Math module
require_relative '../function'

Math.methods(false).each do |method|
  Dentaku::AST::Function.register(method, :numeric, lambda { |*args|
    Math.send(method, *args.flatten.map { |arg| Dentaku::AST::Function.numeric(arg) })
  })
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
dentaku-3.3.4 lib/dentaku/ast/functions/ruby_math.rb
dentaku-3.3.3 lib/dentaku/ast/functions/ruby_math.rb
dentaku-3.3.2 lib/dentaku/ast/functions/ruby_math.rb
dentaku-3.3.1 lib/dentaku/ast/functions/ruby_math.rb
dentaku-3.3.0 lib/dentaku/ast/functions/ruby_math.rb
dentaku-3.2.1 lib/dentaku/ast/functions/ruby_math.rb
dentaku-3.2.0 lib/dentaku/ast/functions/ruby_math.rb
dentaku-3.1.0 lib/dentaku/ast/functions/ruby_math.rb