Loading lib/jsduck/merger.rb +5 −0 Original line number Diff line number Diff line Loading @@ -123,6 +123,7 @@ module JsDuck :alternateClassName => code[:alternateClassName] || [], :xtype => detect_xtype(doc_map), :author => detect_author(doc_map), :docauthor => detect_docauthor(doc_map), :singleton => !!doc_map[:singleton], :private => !!doc_map[:private], } Loading Loading @@ -277,6 +278,10 @@ module JsDuck doc_map[:author] ? doc_map[:author].first[:name] : nil end def detect_docauthor(doc_map) doc_map[:docauthor] ? doc_map[:docauthor].first[:name] : nil end def detect_params(docs, code) implicit = detect_implicit_params(code) explicit = detect_explicit_params(docs) Loading lib/jsduck/page.rb +1 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ module JsDuck classes_row("Mixed into:", @relations.mixed_into(@cls)), boolean_row("xtype:", @cls[:xtype]), boolean_row("Author:", @cls[:author]), boolean_row("Author of docs:", @cls[:docauthor]), "</table>", ].join("\n") end Loading spec/aggregator_classes_spec.rb +17 −0 Original line number Diff line number Diff line Loading @@ -230,6 +230,23 @@ describe JsDuck::Aggregator do end end describe "class with @docauthor" do before do @doc = parse(<<-EOS)[0] /** * @class MyClass * @docauthor John Doe * Comment here. */ EOS end it_should_behave_like "class" it "detects documentation author name" do @doc[:docauthor].should == "John Doe" end end describe "class with @markdown" do before do @doc = parse(<<-EOS)[0] Loading Loading
lib/jsduck/merger.rb +5 −0 Original line number Diff line number Diff line Loading @@ -123,6 +123,7 @@ module JsDuck :alternateClassName => code[:alternateClassName] || [], :xtype => detect_xtype(doc_map), :author => detect_author(doc_map), :docauthor => detect_docauthor(doc_map), :singleton => !!doc_map[:singleton], :private => !!doc_map[:private], } Loading Loading @@ -277,6 +278,10 @@ module JsDuck doc_map[:author] ? doc_map[:author].first[:name] : nil end def detect_docauthor(doc_map) doc_map[:docauthor] ? doc_map[:docauthor].first[:name] : nil end def detect_params(docs, code) implicit = detect_implicit_params(code) explicit = detect_explicit_params(docs) Loading
lib/jsduck/page.rb +1 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ module JsDuck classes_row("Mixed into:", @relations.mixed_into(@cls)), boolean_row("xtype:", @cls[:xtype]), boolean_row("Author:", @cls[:author]), boolean_row("Author of docs:", @cls[:docauthor]), "</table>", ].join("\n") end Loading
spec/aggregator_classes_spec.rb +17 −0 Original line number Diff line number Diff line Loading @@ -230,6 +230,23 @@ describe JsDuck::Aggregator do end end describe "class with @docauthor" do before do @doc = parse(<<-EOS)[0] /** * @class MyClass * @docauthor John Doe * Comment here. */ EOS end it_should_behave_like "class" it "detects documentation author name" do @doc[:docauthor].should == "John Doe" end end describe "class with @markdown" do before do @doc = parse(<<-EOS)[0] Loading