Method: Fable::NativeFunctionOperations#not

Defined in:
lib/fable/native_function_operations.rb

#not(x) ⇒ Object



51
52
53
54
55
56
57
# File 'lib/fable/native_function_operations.rb', line 51

def not(x)
  if x.is_a?(InkList)
    return (x.size == 0) ? 1 : 0
  else
    return (x == 0) ? 1 : 0
  end
end