Class: AmberVM::Functions::Div

Inherits:
Function show all
Defined in:
lib/amber/functions/math/div.rb

Class Method Summary collapse

Methods inherited from Function

call, data_type, execargs, method_missing

Methods included from Plugin

#helper, #included, #plugin_host, #plugin_id, #register_for

Class Method Details

.execute(params, env) ⇒ Object



29
30
31
32
33
34
35
36
# File 'lib/amber/functions/math/div.rb', line 29

def Div.execute params, env
  a = params.shift
  
  params.each do |p|
    a /= p
  end
  a
end

.signatureObject



38
39
40
# File 'lib/amber/functions/math/div.rb', line 38

def Div.signature
  [AmberVM::Classes::Number]
end