123456789_123456789_123456789_123456789_123456789_

Class: YARD::Tags::RefTagList

Relationships & Source Files
Inherits: Object
Defined in: lib/yard/tags/ref_tag_list.rb

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Constructor Details

.new(tag_name, owner, name = nil) ⇒ RefTagList

[ GitHub ]

  
# File 'lib/yard/tags/ref_tag_list.rb', line 7

def initialize(tag_name, owner, name = nil)
  @owner = CodeObjects::Proxy === owner ? owner : P(owner)
  @tag_name = tag_name.to_s
  @name = name
end

Instance Attribute Details

#name (rw)

[ GitHub ]

  
# File 'lib/yard/tags/ref_tag_list.rb', line 5

attr_accessor :owner, :tag_name, :name

#owner (rw)

[ GitHub ]

  
# File 'lib/yard/tags/ref_tag_list.rb', line 5

attr_accessor :owner, :tag_name, :name

#tag_name (rw)

[ GitHub ]

  
# File 'lib/yard/tags/ref_tag_list.rb', line 5

attr_accessor :owner, :tag_name, :name

Instance Method Details

#tags

[ GitHub ]

  
# File 'lib/yard/tags/ref_tag_list.rb', line 13

def tags
  if owner.is_a?(CodeObjects::Base)
    o = owner.tags(tag_name)
    o = o.select {|t| t.name.to_s == name.to_s } if name
    o.each do |t|
      t.extend(RefTag)
      t.owner = owner
    end
    o
  else
    []
  end
end