Class: YARD::Tags::Library

Inherits:
Object
  • Object
show all
Defined in:
lib/yard-notes.rb

Class Attribute Summary collapse

Instance Method Summary collapse

Class Attribute Details

.developers_tagsArray<Symbol>

Sets the list of tags that are not explicitly defined by the YARD proper, nor by the user on the cammnd line via ‘–tag`. These tags are recorded as “developer’s tags” and not displayed in the general documentation.

Returns:

  • (Array<Symbol>)

    list of transitive tags



22
23
24
# File 'lib/yard-notes.rb', line 22

def developers_tags
  @developers_tags
end

Instance Method Details

#respond_to?(tag_method) ⇒ Boolean

If tag is missing then auto-define it.

Returns:

  • (Boolean)


30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/yard-notes.rb', line 30

def respond_to?(tag_method)
  if md = /_tag$/.match(tag_method.to_s)
    tag_name = md.pre_match
    if /^[A-Z]+$/ =~ tag_name
      Tags::Library.define_tag(tag_name.to_s.capitalize, tag_name)
      Tags::Library.developers_tags |= [tag_name]
      true
    else
      super(tag_method)
    end
  else
    super(tag_method)
  end
end