Class: Integer

Inherits:
Object show all
Defined in:
lib/jeweler/utils/core_ext/Integer.rb

Instance Method Summary collapse

Instance Method Details

#to_bObject



2
3
4
5
6
7
8
# File 'lib/jeweler/utils/core_ext/Integer.rb', line 2

def to_b
  if self == 0
    return false
  else
    return true
  end
end

#true?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/jeweler/utils/core_ext/Integer.rb', line 10

def true?
  return self.to_b
end