class Integer

Public Instance Methods

bin() click to toggle source
# File lib/rbfind/humansiz.rb, line 167
def bin
  to_s 0b10
end
hex() click to toggle source
# File lib/rbfind/humansiz.rb, line 161
def hex
  to_s 0x10
end
oct() click to toggle source
# File lib/rbfind/humansiz.rb, line 164
def oct
  to_s 010
end
to_g() click to toggle source
# File lib/rbfind/humansiz.rb, line 87
def to_g
  s = to_s
  l = []
  while (t = s.slice! /\d{1,3}\z/) do l.unshift t end
  l.join "_"
end