Class: Integer
- Inherits:
-
Object
- Object
- Integer
- Defined in:
- lib/rbfind/humansiz.rb,
lib/rbfind/humansiz.rb
Instance Method Summary collapse
Instance Method Details
#bin ⇒ Object
156 157 158 |
# File 'lib/rbfind/humansiz.rb', line 156 def bin to_s 0b10 end |
#hex ⇒ Object
150 151 152 |
# File 'lib/rbfind/humansiz.rb', line 150 def hex to_s 0x10 end |
#oct ⇒ Object
153 154 155 |
# File 'lib/rbfind/humansiz.rb', line 153 def oct to_s 010 end |
#to_g ⇒ Object
87 88 89 90 91 92 |
# 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 |