class JsDuck::Tag::BooleanTag
Base class for simple boolean @tags. Subclasses should only define @pattern and call super, which will take care of setting up @tagname with the same name.
Public Class Methods
new()
click to toggle source
# File lib/jsduck/tag/boolean_tag.rb, line 8 def initialize if @pattern @tagname = @pattern.to_sym end end
Public Instance Methods
parse_doc(p, pos)
click to toggle source
Parses just the name of the tag.
# File lib/jsduck/tag/boolean_tag.rb, line 15 def parse_doc(p, pos) {:tagname => @tagname} end
process_doc(h, docs, pos)
click to toggle source
When the tag is found, its value will always be true.
# File lib/jsduck/tag/boolean_tag.rb, line 20 def process_doc(h, docs, pos) h[@tagname] = true end