Class: JsDuck::Tag::Since
Overview
Implementation of @since tag.
Instance Attribute Summary
Attributes inherited from MetaTag
#assets, #boolean, #context, #formatter, #key, #multiline, #name, #position, #signature
Instance Method Summary collapse
-
#initialize ⇒ Since
constructor
A new instance of Since.
- #to_html(version) ⇒ Object
- #to_value(contents) ⇒ Object
Methods inherited from MetaTag
Constructor Details
#initialize ⇒ Since
Returns a new instance of Since.
7 8 9 10 |
# File 'lib/jsduck/tag/since.rb', line 7 def initialize @name = "since" @key = :since end |
Instance Method Details
#to_html(version) ⇒ Object
19 20 21 22 23 |
# File 'lib/jsduck/tag/since.rb', line 19 def to_html(version) " <p>Available since: <b>\#{version}</b></p>\n EOHTML\nend\n" |
#to_value(contents) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/jsduck/tag/since.rb', line 12 def to_value(contents) if contents.length > 1 JsDuck::Logger.warn(nil, "Only one @since tag allowed per class/member.") end contents[0] end |