def method_missing(m,*a,&b)
      name = m.to_s
      if name[-1] == '?'
        name = name[0...-1].upcase.to_sym
        if constants(false).include?(name)
          v = const_get(name)
          return (value & v) == v
        end
      elsif name[-1] == '='
        name = name[0...-1].upcase.to_sym
        if constants(false).include?(name)
          v = const_get(name)
          if a[0]
            @value |= v
          else
            @value &= ~v
          end
          @name = self.class.name_for(@value)
          return a[0]
        end
      end
      super m, *a, &b
    end
def method_missing(m,*a,&b)
      name = m.to_s
      if name[-1] == '?'
        name = name[0...-1].upcase.to_sym
        if constants(false).include?(name)
          v = const_get(name)
          return (value & v) == v
        end
      elsif name[-1] == '='
        name = name[0...-1].upcase.to_sym
        if constants(false).include?(name)
          v = const_get(name)
          if a[0]
            @value |= v
          else
            @value &= ~v
          end
          @name = self.class.name_for(@value)
          return a[0]
        end
      end
      super m, *a, &b
    end
Enable bit checking and bit setting/clearing.

 For instance, with a constant FLAG_1, this enables :flag_1? and :flag_1=(true|false).