class JsDuck::Tag::Return
Public Class Methods
new()
click to toggle source
# File lib/jsduck/tag/return.rb, line 7 def initialize @pattern = ["return", "returns"] @tagname = :return @repeatable = true @html_position = POS_RETURN end
Public Instance Methods
format(m, formatter)
click to toggle source
# File lib/jsduck/tag/return.rb, line 40 def format(m, formatter) formatter.format_subproperty(m[:return]) end
parse_doc(p, pos)
click to toggle source
@return {Type} return.name …
# File lib/jsduck/tag/return.rb, line 15 def parse_doc(p, pos) tag = p.standard_tag({:tagname => :return, :type => true}) tag[:name] = subproperty_name(p) tag[:doc] = :multiline tag end
process_doc(h, tags, pos)
click to toggle source
# File lib/jsduck/tag/return.rb, line 30 def process_doc(h, tags, pos) ret = tags[0] h[:return] = { :type => ret[:type] || "Object", :name => ret[:name] || "return", :doc => ret[:doc] || "", :properties => JsDuck::Doc::Subproperties.nest(tags, pos)[0][:properties], } end
subproperty_name(p)
click to toggle source
# File lib/jsduck/tag/return.rb, line 22 def subproperty_name(p) if p.hw.look(/return\.\w/) p.ident_chain else "return" end end
to_html(m)
click to toggle source
# File lib/jsduck/tag/return.rb, line 44 def to_html(m) JsDuck::Render::Subproperties.render_return(m[:return]) end