def has_bit_field column, fields
      bitfield_setup! column, fields
      
      fields.each do |field_name, filum|
        class_eval <<-EVAL
          def #{field_name}
            get_bits_for(:#{column}, :#{field_name})
          end

          def #{field_name}=(value)
            set_bits_for(:#{column}, :#{field_name}, value)
          end
        EVAL
      end
    end
def has_bit_field column, fields
      bitfield_setup! column, fields
      
      fields.each do |field_name, filum|
        class_eval <<-EVAL
          def #{field_name}
            get_bits_for(:#{column}, :#{field_name})
          end

          def #{field_name}=(value)
            set_bits_for(:#{column}, :#{field_name}, value)
          end
        EVAL
      end
    end
alias :reset_bitfields :reset_bitfield
 Assign bitfields to a column

 +has_bit_field :column, :fields

 @example
   class User < ActiveRecord::Base
     has_bit_field :counter, :daily => 0..4, :weekly => 5..9, :monthly => 10..14
   end

 @param [ Symbol ] column  Integer attribute to store bitfields
 @param [ Hash ]   fields  Specify the bitfield name, and the columns
                           of the bitstring assigned to it