Class: Integer

Inherits:
Object
  • Object
show all
Defined in:
lib/litle/litle_utils.rb

Instance Method Summary collapse

Instance Method Details

#base(b) ⇒ Object



2
3
4
# File 'lib/litle/litle_utils.rb', line 2

def base(b)
  self < b ? [self] : (self/b).base(b) + [self%b]
end