Loading lib/jsduck/merger.rb +2 −2 Original line number Diff line number Diff line Loading @@ -57,7 +57,7 @@ module JsDuck # Add all items in code not already in result and mark them as # auto-detected. But only if the explicit and auto-detected # names don't conflict. if can_be_autodetected?(docs, code) if Merger.can_be_autodetected?(docs, code) code.each_pair do |key, value| unless h[key] h[key] = value Loading @@ -69,7 +69,7 @@ module JsDuck # True if the name detected from code matches with explicitly # documented name. Also true when no explicit name documented. def can_be_autodetected?(docs, code) def self.can_be_autodetected?(docs, code) docs[:name] == nil || docs[:name] == code[:name] end Loading lib/jsduck/tag/param.rb +2 −7 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ require "jsduck/tag/tag" require "jsduck/doc/subproperties" require "jsduck/render/subproperties" require "jsduck/logger" require "jsduck/merger" module JsDuck::Tag class Param < Tag Loading Loading @@ -53,7 +54,7 @@ module JsDuck::Tag def check_consistency(docs, code, file) explicit = docs[:params] || [] implicit = can_be_autodetected?(docs, code) ? (code[:params] || []) : [] implicit = JsDuck::Merger.can_be_autodetected?(docs, code) ? (code[:params] || []) : [] ex_len = explicit.length im_len = implicit.length Loading @@ -76,11 +77,5 @@ module JsDuck::Tag end end # True if the name detected from code matches with explicitly # documented name. Also true when no explicit name documented. def can_be_autodetected?(docs, code) docs[:name] == nil || docs[:name] == code[:name] end end end Loading
lib/jsduck/merger.rb +2 −2 Original line number Diff line number Diff line Loading @@ -57,7 +57,7 @@ module JsDuck # Add all items in code not already in result and mark them as # auto-detected. But only if the explicit and auto-detected # names don't conflict. if can_be_autodetected?(docs, code) if Merger.can_be_autodetected?(docs, code) code.each_pair do |key, value| unless h[key] h[key] = value Loading @@ -69,7 +69,7 @@ module JsDuck # True if the name detected from code matches with explicitly # documented name. Also true when no explicit name documented. def can_be_autodetected?(docs, code) def self.can_be_autodetected?(docs, code) docs[:name] == nil || docs[:name] == code[:name] end Loading
lib/jsduck/tag/param.rb +2 −7 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ require "jsduck/tag/tag" require "jsduck/doc/subproperties" require "jsduck/render/subproperties" require "jsduck/logger" require "jsduck/merger" module JsDuck::Tag class Param < Tag Loading Loading @@ -53,7 +54,7 @@ module JsDuck::Tag def check_consistency(docs, code, file) explicit = docs[:params] || [] implicit = can_be_autodetected?(docs, code) ? (code[:params] || []) : [] implicit = JsDuck::Merger.can_be_autodetected?(docs, code) ? (code[:params] || []) : [] ex_len = explicit.length im_len = implicit.length Loading @@ -76,11 +77,5 @@ module JsDuck::Tag end end # True if the name detected from code matches with explicitly # documented name. Also true when no explicit name documented. def can_be_autodetected?(docs, code) docs[:name] == nil || docs[:name] == code[:name] end end end