Sha256: 96b4c2ba83c14e9c7debc19b0941e23da605dd0d7ff7b83a8348d6faeffde52b
Contents?: true
Size: 255 Bytes
Versions: 3
Compression:
Stored size: 255 Bytes
Contents
# frozen_string_literal: true module Basic101 class SqrFunction < Function def name 'SQR' end def call(runtime, args) check_args args, [BasicNumeric] value = args.first.eval(runtime) value.sqr end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
basic101-1.0.2 | lib/basic101/sqr_function.rb |
basic101-1.0.1 | lib/basic101/sqr_function.rb |
basic101-1.0.0 | lib/basic101/sqr_function.rb |