def add(tag)
      tag = Tag.new(tag) unless tag.is_a? Tag
      super(tag)

      if tag.machine_tag?
        @machine_tags << tag
        @tags_by_namespace[tag.namespace] ||= ::Set[]
        @tags_by_namespace[tag.namespace] << tag
        @tags_by_namespace_and_predicate[tag.namespace_and_predicate] ||= ::Set[]
        @tags_by_namespace_and_predicate[tag.namespace_and_predicate] << tag
      else
        @plain_tags << tag
      end

      self
    end
def add(tag)
      tag = Tag.new(tag) unless tag.is_a? Tag
      super(tag)

      if tag.machine_tag?
        @machine_tags << tag
        @tags_by_namespace[tag.namespace] ||= ::Set[]
        @tags_by_namespace[tag.namespace] << tag
        @tags_by_namespace_and_predicate[tag.namespace_and_predicate] ||= ::Set[]
        @tags_by_namespace_and_predicate[tag.namespace_and_predicate] << tag
      else
        @plain_tags << tag
      end

      self
    end
Creates a set of tags which can be machine tags. If String objects are passed in they will be
 converted to {Tag}.

 @param enum [Enumerable<Tag, String>, nil] the enumerable object of tags
 @param block [Proc] the optional block to preprocess elements before inserting them

 Adds a tag to the set of tags. If a String object is passed in it will be converted to {Tag}.

 @param tag [Tag, String] the tag or string to add

 @return [Set] the tag set