Class: Integer
- Inherits:
-
Object
- Object
- Integer
- Defined in:
- lib/bit_utils/core_ext/each_bit.rb,
lib/bit_utils/core_ext/popcount.rb,
lib/bit_utils/core_ext/trailing_zeros.rb
Overview
Core Extension for Integer
Instance Method Summary collapse
Instance Method Details
#each_bit(&block) ⇒ Object
5 6 7 |
# File 'lib/bit_utils/core_ext/each_bit.rb', line 5 def each_bit(&block) BitUtils.each_bit self, &block end |
#popcount ⇒ Object
6 7 8 |
# File 'lib/bit_utils/core_ext/popcount.rb', line 6 def popcount BitUtils.popcount self end |
#trailing_zeros ⇒ Object
5 6 7 |
# File 'lib/bit_utils/core_ext/trailing_zeros.rb', line 5 def trailing_zeros BitUtils.trailing_zeros self end |