summaryrefslogtreecommitdiff
path: root/deployment_scripts/puppet/files/embedded/lib/ruby/gems/2.3.0/gems/dentaku-2.0.9/lib/dentaku/ast/functions/ruby_math.rb
blob: 65f43871270ee944abf4e9c937ef0550ffc0659d (plain)
1
2
3
4
5
6
7
8
# import all functions from Ruby's Math module
require_relative "../function"

Math.methods(false).each do |method|
  Dentaku::AST::Function.register(method, :numeric, ->(*args) {
    Math.send(method, *args)
  })
end