Returns a list of tags specified by name or all tags if name is not specified.
name
Parameters:
the tag name to return data for, or nil for all tags
Returns:
the list of tags by the specified tag name
216 217 218 219 220
# File 'lib/yard/docstring.rb', line 216 def tags(name = nil) list = @tags + convert_ref_tags return list unless name list.select {|tag| tag.tag_name.to_s == name.to_s } end