class Integer
Public Instance Methods
to_bool()
click to toggle source
# File lib/ext/to_bool.rb, line 4 def to_bool return true if self == 1 return false if zero? raise "Integer '#{self}' can't be converted to Boolean." end