Class: NilClass

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

Overview

NilClass is extended with a few methods

Instance Method Summary collapse

Instance Method Details

#and(other) ⇒ FalseClass

Boolean ‘and’ operation

Parameters:

Returns:

See Also:



197
198
199
200
201
202
203
204
# File 'lib/multiarray.rb', line 197

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

#compilable?FalseClass, TrueClass

Check whether this term is compilable

Returns:



239
240
241
# File 'lib/multiarray.rb', line 239

def compilable?
  false
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:



230
231
232
# File 'lib/multiarray.rb', line 230

def conditional( a, b )
  b
end

#notFalseClass

Boolean negation

Returns:

See Also:



186
187
188
# File 'lib/multiarray.rb', line 186

def not
   true
end

#or(other) ⇒ FalseClass, TrueClass

Boolean ‘or’ operation

Parameters:

Returns:

See Also:



213
214
215
216
217
218
219
220
# File 'lib/multiarray.rb', line 213

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