Loading lib/jsduck/ast.rb +1 −1 Original line number Diff line number Diff line Loading @@ -242,6 +242,7 @@ module JsDuck ast["properties"].each do |p| cfg = make_property(key_value(p["key"]), p["value"], :cfg) cfg[:accessor] = true # When config has a comment, update the related docset, # otherwise add it as new config to current class. docset = find_docset(p) Loading @@ -249,7 +250,6 @@ module JsDuck docset[:code] = cfg else cfg[:inheritdoc] = {} cfg[:accessor] = true cfg[:autodetected] = true configs << cfg end Loading spec/aggregator_cfg_spec.rb +4 −0 Original line number Diff line number Diff line Loading @@ -126,6 +126,10 @@ describe JsDuck::Aggregator do it "detects the config as public" do docs[0][:members][:cfg][0][:private].should_not == true end it "detects the config accessor" do docs[0][:members][:cfg][0][:accessor].should == true end end end Loading
lib/jsduck/ast.rb +1 −1 Original line number Diff line number Diff line Loading @@ -242,6 +242,7 @@ module JsDuck ast["properties"].each do |p| cfg = make_property(key_value(p["key"]), p["value"], :cfg) cfg[:accessor] = true # When config has a comment, update the related docset, # otherwise add it as new config to current class. docset = find_docset(p) Loading @@ -249,7 +250,6 @@ module JsDuck docset[:code] = cfg else cfg[:inheritdoc] = {} cfg[:accessor] = true cfg[:autodetected] = true configs << cfg end Loading
spec/aggregator_cfg_spec.rb +4 −0 Original line number Diff line number Diff line Loading @@ -126,6 +126,10 @@ describe JsDuck::Aggregator do it "detects the config as public" do docs[0][:members][:cfg][0][:private].should_not == true end it "detects the config accessor" do docs[0][:members][:cfg][0][:accessor].should == true end end end