Class: JsDuck::Tag::Since
Constant Summary
Constants inherited from Tag
Tag::POS_ASIDE, Tag::POS_DEFAULT, Tag::POS_DEPRECATED, Tag::POS_DOC, Tag::POS_ENUM, Tag::POS_FIRES, Tag::POS_LOCALDOC, Tag::POS_OVERRIDES, Tag::POS_PARAM, Tag::POS_PREVENTABLE, Tag::POS_PRIVATE, Tag::POS_RETURN, Tag::POS_SINCE, Tag::POS_SUBPROPERTIES, Tag::POS_TEMPLATE, Tag::POS_THROWS
Instance Attribute Summary
Attributes inherited from Tag
#css, #ext_define_default, #ext_define_pattern, #html_position, #pattern, #repeatable, #signature, #tagname
Instance Method Summary collapse
-
#initialize ⇒ Since
constructor
A new instance of Since.
- #parse_doc(p, pos) ⇒ Object
- #process_doc(h, tags, pos) ⇒ Object
- #to_html(context) ⇒ Object
Methods inherited from Tag
descendants, #format, #parse_ext_define
Constructor Details
Instance Method Details
#parse_doc(p, pos) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/jsduck/tag/since.rb', line 12 def parse_doc(p, pos) { :tagname => :since, :version => p.match(/.*$/).strip, } end |
#process_doc(h, tags, pos) ⇒ Object
19 20 21 |
# File 'lib/jsduck/tag/since.rb', line 19 def process_doc(h, , pos) h[:since] = [0][:version] end |
#to_html(context) ⇒ Object
23 24 25 26 27 |
# File 'lib/jsduck/tag/since.rb', line 23 def to_html(context) <<-EOHTML <p>Available since: <b>#{context[:since]}</b></p> EOHTML end |