Class: Base32::NormalizedInteger
- Inherits:
-
Object
- Object
- Base32::NormalizedInteger
- Defined in:
- lib/base32/crockford.rb
Instance Method Summary collapse
- #each_byte(&blk) ⇒ Object
-
#initialize(v) ⇒ NormalizedInteger
constructor
A new instance of NormalizedInteger.
Constructor Details
#initialize(v) ⇒ NormalizedInteger
Returns a new instance of NormalizedInteger.
6 7 8 |
# File 'lib/base32/crockford.rb', line 6 def initialize v @value = v end |
Instance Method Details
#each_byte(&blk) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/base32/crockford.rb', line 11 def each_byte &blk v = @value while v > 0 yield (v & 255) v >>= 8 end end |