def read_field(*args)
      m = 0
      args.flatten.each_with_index do |bit, i|
        if bit.is_a?(Integer)
          m |= ((@value[bit] || 0) << i)
        end
      end
      m
    end
def read_field(*args)
      m = 0
      args.flatten.each_with_index do |bit, i|
        if bit.is_a?(Integer)
          m |= ((@value[bit] || 0) << i)
        end
      end
      m
    end
Read the specified bit indices as a group, in the order given

 @param [Integer] bits one or more bit indices to read. Order matters!

 @example Read bits or a list of bits into an integer
   bit_field = BitField.new(101) # 1100101 in binary, lsb on the right
   bit_field.read_field(0, 1, 2) #=> 5 # or 101
   bit_field.read_field(0) #= 1
   bit_field.read_field( (2..6).to_a ) #=> 25 # or 11001

 @return [Integer] the value of the bits read together into an integer