Class: Basic101::AbsFunction
- Defined in:
- lib/basic101/abs_function.rb
Instance Method Summary collapse
Methods inherited from Function
Instance Method Details
#call(runtime, args) ⇒ Object
13 14 15 16 17 |
# File 'lib/basic101/abs_function.rb', line 13 def call(runtime, args) check_args args, [BasicNumeric] value = args.first.eval(runtime) value.abs end |
#name ⇒ Object
9 10 11 |
# File 'lib/basic101/abs_function.rb', line 9 def name 'ABS' end |