Returns a list of tags specified by +name+ or all tags if +name+ is not specified.

 @param [#to_s] name the tag name to return data for, or nil for all tags
 @return [Array<Tags::Tag>] the list of tags by the specified tag name
15875
def tags(name = nil)
      list = stable_sort_by(@tags + convert_ref_tags, &:tag_name)
      return list unless name
      list.select {|tag| tag.tag_name.to_s == name.to_s }
    end
1137067
def get_tags(self, name):
        
        tags = list()
        for tag in self._tags:
            if tag[0] == name:
                tags.append(tag[1])

        return tags
539616
public function getTagsByName(string $name): array
    {
        $result = [];

        /** @var Tag $tag */
        foreach ($this->getTags() as $tag) {
            if ($tag->getName() !== $name) {
                continue;
            }

            $result[] = $tag;
        }

        return $result;
    }
767516
def _get_tags(self):
        # type: () -> List[str]
        
        tags = self.data.get('tags', None)
        if not tags:
            return list()
        return [x['name'] for x in tags]
238157
public static Tags of(@Nullable Iterable<? extends Tag> tags) {
        if (tags == null || !tags.iterator().hasNext()) {
            return Tags.empty();
        } else if (tags instanceof Tags) {
            return (Tags) tags;
        } else if (tags instanceof Collection) {
            Collection<? extends Tag> tagsCollection = (Collection<? extends Tag>) tags;
            return new Tags(tagsCollection.toArray(new Tag[0]));
        } else {
            return new Tags(StreamSupport.stream(tags.spliterator(), false).toArray(Tag[]::new));
        }
    }
963147
def tags_get(params={})
      options = create_params(params)
      tags = self.class.get('/tags/get', options)['tags']['tag']
      tags = [] if tags.nil?
      tags = [*tags]
      tags.map { |p| Tag.new(Util.symbolize_keys(p)) }
    end
996772
def tags(key = nil)
      if custom?
        tags = @data[:data][:sdk][:custom][:tags]
      else
        tags = @data[:data][key]
      end
      key ? tags[key] : tags
    end
473428
def get_tag(tag_type)
      matches = @tags.select { |m| m.type==tag_type }
      return matches.first
    end
1263017
def tag(self, name: str) -> models.Tag:
        """"""
        return self.Tag.filter_by(name=name).first()
973158
def add_tags(new_tags)
      case new_tags
      when Array # Called with an array
        # Call recursively for each entry
        new_tags.each do |tag_hash|
          add_tags(tag_hash)
        end
      when Hash # Called with a hash
        #check if it is weird {'k' => 'key', 'v' => 'value'} syntax
        if (new_tags.size == 2 && new_tags.keys.include?('k') && new_tags.keys.include?('v'))
          # call recursively with values from k and v keys.
          add_tags({new_tags['k'] => new_tags['v']})
        else
          # OK, this seems to be a proper ruby hash with a single entry
          new_tags.each do |k,v|
            self.tags[k] = v
          end
        end
      end
      self    # return self so calls can be chained
    end
245793
def tag(*tags)
      attribute "tags" do |existing_tags|
        existing_tags ||= []
        tags.each do |tag|
          if !existing_tags.include?(tag.to_s)
            existing_tags << tag.to_s
          end
        end
        existing_tags
      end
    end
1102353
def each_by_tag(tags)
      reindex unless @clean
      indices = []
      # Get all the indices associated with the tags
      Array(tags).each do |t|
        indices.concat @tags[t] if @tags[t]
      end

      # Remove any nils
      indices.compact!
      return [] if indices.empty?

     # Sort it, so we get the fields back in the order they appear in the record
      indices.sort!

      indices.each do |tag|
        yield self[tag]
      end
    end
292637
def specs_from_names(names)
      names.map do |name|
        spec = available_spec(name)
        fail "#{name} was not found" if spec.nil?
        spec
      end
    end
18717
def get_tag(name)
      tag = nil
      name = name.to_s.downcase
      @tag_name_pairs_cache ||= Hash.new
      return @tag_name_pairs_cache[name] unless @tag_name_pairs_cache[name].nil?
      @elements.each_value do |element|
        next unless element.name.downcase == name
        tag = element.tag
        break
      end
      @tag_name_pairs_cache[name]=tag
      return tag
    end
150607
def tags(self):
		'''

		'''
		q = meta.Session.query(_tag.Tag)
		q = q.join(TagSemanticTag)
		q = q.filter_by(tag_id=self.id)
#		q = q.filter_by(state='active')
		q = q.order_by(_tag.Tag.name)
		tags = q.all()
		return tags
1160478
def [](name)
      key = name.to_s
      if attributes.key?(key)
        attributes[key]
      elsif index = underscored_column_names.index(key)
        attributes[@columns[index].name]
      end
    end
784036
def find(self, tag_name, params=None, fn=None, case_sensitive=False):
        
        return [
            x for x in self.findAll(tag_name, params, fn, case_sensitive)
            if not x.isEndTag()
        ]