Class: FalseClass

Inherits:
Object show all
Defined in:
lib/multiarray.rb

Overview

FalseClass is extended with a few methods

See Also:

  • TrueClass

Instance Method Summary collapse

Instance Method Details

#and(other) ⇒ FalseClass

Boolean ‘and’ operation

Parameters:

Returns:

See Also:



267
268
269
270
271
272
273
274
# File 'lib/multiarray.rb', line 267

def and( other )
  unless other.is_a? Hornetseye::Node
    self
  else
    x, y = other.coerce self
    x.and y
  end
end

#conditional(a, b) ⇒ Object

Boolean select operation

Parameters:

  • a (Object)

    Object to select if self is neither false nor nil.

  • b (Object)

    Object to select if self is false or nil.

Returns:

See Also:



300
301
302
# File 'lib/multiarray.rb', line 300

def conditional( a, b )
  b
end

#notFalseClass

Boolean negation

Returns:

See Also:



256
257
258
# File 'lib/multiarray.rb', line 256

def not
  true
end

#or(other) ⇒ FalseClass, TrueClass

Boolean ‘or’ operation

Parameters:

Returns:

See Also:



283
284
285
286
287
288
289
290
# File 'lib/multiarray.rb', line 283

def or( other )
  unless other.is_a? Hornetseye::Node
    other
  else
    x, y = other.coerce self
    x.or y
  end
end