Loading lib/jsduck/builtins/inheritdoc.rb +5 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ module JsDuck::Builtins class Inheritdoc < Tag def initialize @pattern = ["inheritdoc", "inheritDoc"] @key = :inheritdoc end # @inheritdoc class.name#static-type-member Loading @@ -18,5 +19,9 @@ module JsDuck::Builtins p.maybe_ident_chain(:cls) p.maybe_member_reference end def process_doc(docs) docs.first end end end lib/jsduck/doc_ast.rb +2 −5 Original line number Diff line number Diff line Loading @@ -130,17 +130,14 @@ module JsDuck # Detects properties common for each doc-object and adds them def add_shared(hash, doc_map) hash.merge!({ :inheritdoc => extract(doc_map, :inheritdoc), :meta => detect_meta(doc_map), }) doc_map.each_pair do |key, value| if tag = BuiltinsRegistry.get_by_key(key) hash[key] = tag.process_doc(value) end end hash[:meta] = detect_meta(doc_map) # copy :private also to main hash hash[:private] = hash[:meta][:private] ? true : nil Loading Loading
lib/jsduck/builtins/inheritdoc.rb +5 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ module JsDuck::Builtins class Inheritdoc < Tag def initialize @pattern = ["inheritdoc", "inheritDoc"] @key = :inheritdoc end # @inheritdoc class.name#static-type-member Loading @@ -18,5 +19,9 @@ module JsDuck::Builtins p.maybe_ident_chain(:cls) p.maybe_member_reference end def process_doc(docs) docs.first end end end
lib/jsduck/doc_ast.rb +2 −5 Original line number Diff line number Diff line Loading @@ -130,17 +130,14 @@ module JsDuck # Detects properties common for each doc-object and adds them def add_shared(hash, doc_map) hash.merge!({ :inheritdoc => extract(doc_map, :inheritdoc), :meta => detect_meta(doc_map), }) doc_map.each_pair do |key, value| if tag = BuiltinsRegistry.get_by_key(key) hash[key] = tag.process_doc(value) end end hash[:meta] = detect_meta(doc_map) # copy :private also to main hash hash[:private] = hash[:meta][:private] ? true : nil Loading