# Class: YARD::Tags::RefTagList

Inherits:
  Object
  - Object
  - YARD::Tags::RefTagList
  show all

Defined in:
  lib/yard/tags/ref_tag_list.rb

## Instance Attribute Summary collapse

- #name ⇒ Object

  Returns the value of attribute name.

- #owner ⇒ Object

  Returns the value of attribute owner.

- #tag_name ⇒ Object

  Returns the value of attribute tag_name.

## Instance Method Summary collapse

- #initialize(tag_name, owner, name = nil) ⇒ RefTagList constructor

  A new instance of RefTagList.

- #tags ⇒ Object

## Constructor Details

### #initialize(tag_name, owner, name = nil) ⇒ `RefTagList`

Returns a new instance of RefTagList.

    7
    8
    9
    10
    11

    # 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 ⇒ `Object`

Returns the value of attribute name.

    5
    6
    7

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

    def name
      @name
    end

### #owner ⇒ `Object`

Returns the value of attribute owner.

    5
    6
    7

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

    def owner
      @owner
    end

### #tag_name ⇒ `Object`

Returns the value of attribute tag_name.

    5
    6
    7

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

    def tag_name
      @tag_name
    end

## Instance Method Details

### #tags ⇒ `Object`

    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25

    # 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