Class: NilClass

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

Instance Method Summary collapse

Instance Method Details

#&(anObject) ⇒ Object

Returns false



587
588
589
# File 'lib/framework/builtinME.rb', line 587

def &(anObject)
    false
end

#^(anObject) ⇒ Object

Returns false if anObject is nil or false, true otherwise



592
593
594
# File 'lib/framework/builtinME.rb', line 592

def ^(anObject)
    anObject ? true : false
end

#inspectObject



625
626
627
# File 'lib/framework/builtinME.rb', line 625

def inspect
    "nil"
end

#nil?Boolean

Always returns true

Returns:

  • (Boolean)


602
603
604
# File 'lib/framework/builtinME.rb', line 602

def nil?
    true
end

#to_aObject

Always returns an empty array



607
608
609
# File 'lib/framework/builtinME.rb', line 607

def to_a
    []
end

#to_fObject



616
617
618
# File 'lib/framework/builtinME.rb', line 616

def to_f
    0.0
end

#to_iObject

Always returns zero



612
613
614
# File 'lib/framework/builtinME.rb', line 612

def to_i
    0
end

#to_sObject Also known as: to_str

Always returns the empty string



621
622
623
# File 'lib/framework/builtinME.rb', line 621

def to_s
    ""
end

#|(anObject) ⇒ Object

Returns false if anObject is nil or false, true otherwise



597
598
599
# File 'lib/framework/builtinME.rb', line 597

def |(anObject)
    anObject ? true : false
end