class JsDuck::Tag::Author
Author
tag gets processed, but no output gets created. Users of JSDuck may override this tag to make it print the names of authors.
Public Class Methods
new()
click to toggle source
# File lib/jsduck/tag/author.rb, line 8 def initialize @pattern = "author" @tagname = :author @repeatable = true end
Public Instance Methods
parse_doc(p, pos)
click to toggle source
@author Name of Author
<email@example.com> …
# File lib/jsduck/tag/author.rb, line 15 def parse_doc(p, pos) name = p.match(/[^<\n]*/).strip if p.look(/</) p.match(/</) email = p.match(/[^>\n]*/) p.match(/>/) end return {:tagname => @tagname, :name => name, :email => email} end
process_doc(context, tags, pos)
click to toggle source
# File lib/jsduck/tag/author.rb, line 26 def process_doc(context, tags, pos) context[@tagname] = tags end