Class: DecisionAgent::Dmn::Feel::Functions::Round
- Inherits:
-
Base
- Object
- Base
- DecisionAgent::Dmn::Feel::Functions::Round
show all
- Defined in:
- lib/decision_agent/dmn/feel/functions.rb
Class Method Summary
collapse
Methods inherited from Base
register, validate_arg_count
Class Method Details
.call(args, _context = {}) ⇒ Object
187
188
189
190
191
192
|
# File 'lib/decision_agent/dmn/feel/functions.rb', line 187
def self.call(args, _context = {})
validate_arg_count(args, 1..2)
value = args[0].to_f
precision = args[1].to_i
value.round(precision)
end
|