Class: Integer

Inherits:
Object
  • Object
show all
Defined in:
lib/wnm_support/core_ext/to_array.rb,
lib/wnm_support/core_ext/to_boolean.rb

Instance Method Summary collapse

Instance Method Details

#to_aObject



2
3
4
# File 'lib/wnm_support/core_ext/to_array.rb', line 2

def to_a
  Array.wrap(self)
end

#to_bObject Also known as: to_bool



2
3
4
# File 'lib/wnm_support/core_ext/to_boolean.rb', line 2

def to_b
  !self.zero?
end