Class: NilClass

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

Instance Method Summary collapse

Instance Method Details

#&(anObject) ⇒ Object

Returns false



483
484
485
# File 'lib/builtinME.rb', line 483

def &(anObject)
    false
end

#^(anObject) ⇒ Object

Returns false if anObject is nil or false, true otherwise



488
489
490
# File 'lib/builtinME.rb', line 488

def ^(anObject)
    anObject ? true : false
end

#inspectObject



521
522
523
# File 'lib/builtinME.rb', line 521

def inspect
    "nil"
end

#nil?Boolean

Always returns true

Returns:

  • (Boolean)


498
499
500
# File 'lib/builtinME.rb', line 498

def nil?
    true
end

#to_aObject

Always returns an empty array



503
504
505
# File 'lib/builtinME.rb', line 503

def to_a
    []
end

#to_fObject



512
513
514
# File 'lib/builtinME.rb', line 512

def to_f
    0.0
end

#to_iObject

Always returns zero



508
509
510
# File 'lib/builtinME.rb', line 508

def to_i
    0
end

#to_sObject Also known as: to_str

Always returns the empty string



517
518
519
# File 'lib/builtinME.rb', line 517

def to_s
    ""
end

#|(anObject) ⇒ Object

Returns false if anObject is nil or false, true otherwise



493
494
495
# File 'lib/builtinME.rb', line 493

def |(anObject)
    anObject ? true : false
end