Class: NilClass

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

Instance Method Summary collapse

Instance Method Details

#&(anObject) ⇒ Object

Returns false



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

def &(anObject)
    false
end

#^(anObject) ⇒ Object

Returns false if anObject is nil or false, true otherwise



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

def ^(anObject)
    anObject ? true : false
end

#inspectObject



542
543
544
# File 'lib/builtinME.rb', line 542

def inspect
    "nil"
end

#nil?Boolean

Always returns true

Returns:

  • (Boolean)


519
520
521
# File 'lib/builtinME.rb', line 519

def nil?
    true
end

#to_aObject

Always returns an empty array



524
525
526
# File 'lib/builtinME.rb', line 524

def to_a
    []
end

#to_fObject



533
534
535
# File 'lib/builtinME.rb', line 533

def to_f
    0.0
end

#to_iObject

Always returns zero



529
530
531
# File 'lib/builtinME.rb', line 529

def to_i
    0
end

#to_sObject Also known as: to_str

Always returns the empty string



538
539
540
# File 'lib/builtinME.rb', line 538

def to_s
    ""
end

#|(anObject) ⇒ Object

Returns false if anObject is nil or false, true otherwise



514
515
516
# File 'lib/builtinME.rb', line 514

def |(anObject)
    anObject ? true : false
end