def bitmask_virtual_attributes(bitmask)
      send("values_for_#{bitmask}").each do |value|
        define_method("#{value}") { send("#{bitmask}?", value) }
        define_method("#{value}=") { |arg| send("#{bitmask}=", arg.blank? || arg == "0" ? send("#{bitmask}") - [value] : send("#{bitmask}") << value) }
      end
    end
def bitmask_virtual_attributes(bitmask)
      send("values_for_#{bitmask}").each do |value|
        define_method("#{value}") { send("#{bitmask}?", value) }
        define_method("#{value}=") { |arg| send("#{bitmask}=", arg.blank? || arg == "0" ? send("#{bitmask}") - [value] : send("#{bitmask}") << value) }
      end
    end
Setup virtual attributes for Bitmask attributes

 Allows you to set and read Bitmask attributes using #value= and
 #value methods
 @arg [Symbol] bitmask the name of the bitmask attribute