Class: Float

Inherits:
Object show all
Defined in:
lib/mug/bool.rb

Instance Method Summary collapse

Instance Method Details

#to_bObject

Converts num to a boolean. Returns true if not zero or NaN. Note: -0.0 is false, and +/-infinity are true.



46
47
48
# File 'lib/mug/bool.rb', line 46

def to_b
	!(self.zero? || self.nan?)
end