Sha256: da89e7732d629e8fe1d590bf1585b3293b0f16d56aa63cb9484f917f56884899
Contents?: true
Size: 824 Bytes
Versions: 29
Compression:
Stored size: 824 Bytes
Contents
require "jsduck/tag/tag" require "jsduck/render/subproperties" module JsDuck::Tag class Throws < Tag def initialize @pattern = "throws" @tagname = :throws @repeatable = true @html_position = POS_THROWS end # @throws {Type} ... def parse_doc(p, pos) tag = p.standard_tag({:tagname => :throws, :type => true}) tag[:doc] = :multiline tag end def process_doc(h, tags, pos) result = tags.map do |throws| { :type => throws[:type] || "Object", :doc => throws[:doc] || "", } end h[:throws] = result end def format(m, formatter) m[:throws].each {|t| formatter.format_subproperty(t) } end def to_html(m) JsDuck::Render::Subproperties.render_throws(m[:throws]) end end end
Version data entries
29 entries across 29 versions & 3 rubygems