Class: Basic101::LogFunction

Inherits:
Function show all
Defined in:
lib/basic101/log_function.rb

Instance Method Summary collapse

Methods inherited from Function

#check_args

Instance Method Details

#call(runtime, args) ⇒ Object



11
12
13
14
15
# File 'lib/basic101/log_function.rb', line 11

def call(runtime, args)
  check_args args, [BasicNumeric]
  arg = args.first
  arg.eval(runtime).log
end

#nameObject



7
8
9
# File 'lib/basic101/log_function.rb', line 7

def name
  'LOG'
end