Loading lib/jsduck/tag/extends.rb +10 −1 Original line number Diff line number Diff line Loading @@ -12,10 +12,19 @@ module JsDuck::Tag end # @extends classname # or # @extends {classname} def parse_doc(p) if p.hw.match(/\{/) cls = p.ident_chain p.match(/\}/) else cls = p.ident_chain end { :tagname => :extends, :extends => p.hw.ident_chain, :extends => cls, } end Loading spec/aggregator_classes_spec.rb +15 −0 Original line number Diff line number Diff line Loading @@ -538,6 +538,21 @@ describe JsDuck::Aggregator do end describe "@extend followed by class name in {curly brackets}" do before do @doc = parse(<<-EOS)["Foo"] /** * @class Foo * @extends {Bar.Baz} */ EOS end it "detectes the name of the extended class" do @doc[:extends].should == "Bar.Baz" end end shared_examples_for "extending Object" do it "has extends == nil" do @doc[:extends].should == nil Loading Loading
lib/jsduck/tag/extends.rb +10 −1 Original line number Diff line number Diff line Loading @@ -12,10 +12,19 @@ module JsDuck::Tag end # @extends classname # or # @extends {classname} def parse_doc(p) if p.hw.match(/\{/) cls = p.ident_chain p.match(/\}/) else cls = p.ident_chain end { :tagname => :extends, :extends => p.hw.ident_chain, :extends => cls, } end Loading
spec/aggregator_classes_spec.rb +15 −0 Original line number Diff line number Diff line Loading @@ -538,6 +538,21 @@ describe JsDuck::Aggregator do end describe "@extend followed by class name in {curly brackets}" do before do @doc = parse(<<-EOS)["Foo"] /** * @class Foo * @extends {Bar.Baz} */ EOS end it "detectes the name of the extended class" do @doc[:extends].should == "Bar.Baz" end end shared_examples_for "extending Object" do it "has extends == nil" do @doc[:extends].should == nil Loading