Method: BitMagic::BitField#read_bits
- Defined in:
- lib/bit_magic/bit_field.rb
#read_bits(*args) ⇒ Hash
Read the specified bit indices into a hash with bit index as key
35 36 37 38 39 |
# File 'lib/bit_magic/bit_field.rb', line 35 def read_bits(*args) {}.tap do |m| args.each { |bit| m[bit] = @value[bit] } end end |