Loading lib/jsduck/ast.rb +1 −0 Original line number Diff line number Diff line Loading @@ -245,6 +245,7 @@ module JsDuck docset[:code] = cfg else cfg[:inheritdoc] = {:no_warnings => true} cfg[:private] = true configs << cfg end end Loading lib/jsduck/doc_ast.rb +2 −1 Original line number Diff line number Diff line Loading @@ -135,8 +135,9 @@ module JsDuck :inheritdoc => extract(doc_map, :inheritdoc), :meta => detect_meta(doc_map), }) # copy :private also to main hash hash[:private] = true if hash[:meta][:private] hash[:private] = hash[:meta][:private] ? true : nil return hash end Loading lib/jsduck/merger.rb +3 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,9 @@ module JsDuck h[:name] = merge_name(docs, code) h[:id] = create_member_id(h) # Copy private to meta h[:meta][:private] = h[:private] if h[:private] h end Loading spec/aggregator_cfg_spec.rb +12 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,14 @@ describe JsDuck::Aggregator do it "sets :inheritdoc flag on config" do cfg[0][:inheritdoc].should == {:no_warnings => true} end it "sets :private flag on config" do cfg[0][:private].should == true end it "sets meta :private flag on config" do cfg[0][:meta][:private].should == true end end describe "detecting Ext.define() with commented config" do Loading Loading @@ -71,6 +79,10 @@ describe JsDuck::Aggregator do it "detects owner of the config" do docs[0][:members][:cfg][0][:owner].should == "MyClass" end it "detects the config as public" do docs[0][:members][:cfg][0][:private].should_not == true end end end Loading
lib/jsduck/ast.rb +1 −0 Original line number Diff line number Diff line Loading @@ -245,6 +245,7 @@ module JsDuck docset[:code] = cfg else cfg[:inheritdoc] = {:no_warnings => true} cfg[:private] = true configs << cfg end end Loading
lib/jsduck/doc_ast.rb +2 −1 Original line number Diff line number Diff line Loading @@ -135,8 +135,9 @@ module JsDuck :inheritdoc => extract(doc_map, :inheritdoc), :meta => detect_meta(doc_map), }) # copy :private also to main hash hash[:private] = true if hash[:meta][:private] hash[:private] = hash[:meta][:private] ? true : nil return hash end Loading
lib/jsduck/merger.rb +3 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,9 @@ module JsDuck h[:name] = merge_name(docs, code) h[:id] = create_member_id(h) # Copy private to meta h[:meta][:private] = h[:private] if h[:private] h end Loading
spec/aggregator_cfg_spec.rb +12 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,14 @@ describe JsDuck::Aggregator do it "sets :inheritdoc flag on config" do cfg[0][:inheritdoc].should == {:no_warnings => true} end it "sets :private flag on config" do cfg[0][:private].should == true end it "sets meta :private flag on config" do cfg[0][:meta][:private].should == true end end describe "detecting Ext.define() with commented config" do Loading Loading @@ -71,6 +79,10 @@ describe JsDuck::Aggregator do it "detects owner of the config" do docs[0][:members][:cfg][0][:owner].should == "MyClass" end it "detects the config as public" do docs[0][:members][:cfg][0][:private].should_not == true end end end