Sha256: feb60ffc3e1be1cf3e70a626870bff81b521df4d3da0a8cbcec268eed8b82cf4

Contents?: true

Size: 504 Bytes

Versions: 22

Compression:

Stored size: 504 Bytes

Contents

require "jsduck/meta_tag"
require "jsduck/logger"

module JsDuck::Tag
  # Implementation of @since tag.
  class Since < JsDuck::MetaTag
    def initialize
      @name = "since"
      @key = :since
    end

    def to_value(contents)
      if contents.length > 1
        JsDuck::Logger.warn(nil, "Only one @since tag allowed per class/member.")
      end
      contents[0]
    end

    def to_html(version)
      <<-EOHTML
        <p>Available since: <b>#{version}</b></p>
      EOHTML
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
jsduck-4.10.4 lib/jsduck/tag/since.rb
jsduck-4.10.3 lib/jsduck/tag/since.rb
jsduck-4.10.2 lib/jsduck/tag/since.rb
jsduck-4.10.1 lib/jsduck/tag/since.rb
jsduck-4.10.0 lib/jsduck/tag/since.rb
jsduck-4.9.0 lib/jsduck/tag/since.rb
jsduck-4.8.0 lib/jsduck/tag/since.rb
jsduck-4.7.1 lib/jsduck/tag/since.rb
jsduck-4.7.0 lib/jsduck/tag/since.rb
jsduck-4.6.2 lib/jsduck/tag/since.rb
jsduck-4.6.1 lib/jsduck/tag/since.rb
jsduck-4.6.0 lib/jsduck/tag/since.rb
jsduck-4.5.1 lib/jsduck/tag/since.rb
jsduck-4.5.0 lib/jsduck/tag/since.rb
jsduck-4.4.1 lib/jsduck/tag/since.rb
jsduck-4.4.0 lib/jsduck/tag/since.rb
jsduck-4.3.2 lib/jsduck/tag/since.rb
jsduck-4.3.1 lib/jsduck/tag/since.rb
jsduck-4.3.0 lib/jsduck/tag/since.rb
jsduck-4.2.1 lib/jsduck/tag/since.rb