Class: AmberVM::Functions::Not

Inherits:
Function show all
Defined in:
lib/amber/functions/logic/not.rb

Overview

The Not function is not very complicated, it takes argument, tests if it is_true? and returns the opposite as a Boolean.

Class Method Summary collapse

Methods inherited from Function

call, data_type, execargs, method_missing, signature

Methods included from Plugin

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

Class Method Details

.execute(params, env) ⇒ Object



32
33
34
# File 'lib/amber/functions/logic/not.rb', line 32

def execute params, env
  AmberVM::Classes::Boolean.new(! params[0].is_true?)
end