Commit ffdf8f41 authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Document why we have a static method in Merger class.

Plus a typo.
parent 2c9e9389
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -67,11 +67,13 @@ module JsDuck

    # True if the name detected from code matches with explicitly
    # documented name.  Also true when no explicit name documented.
    #
    # Note: This method is also called from ParamsMerger.
    def self.can_be_autodetected?(docs, code)
      docs[:name] == nil || docs[:name] == code[:name]
    end

    # Stores the key as flag into h[:autodetcted]
    # Stores the key as flag into h[:autodetected]
    def mark_autodetected(h, key)
      h[:autodetected][key] = true
    end