Class: JsDuck::InheritDoc

Inherits:
Object
  • Object
show all
Defined in:
lib/jsduck/inherit_doc.rb

Overview

Deals with inheriting documentation

Instance Method Summary collapse

Constructor Details

#initialize(relations) ⇒ InheritDoc

Returns a new instance of InheritDoc.



8
9
10
# File 'lib/jsduck/inherit_doc.rb', line 8

def initialize(relations)
  @relations = relations
end

Instance Method Details

#resolve_allObject

Performs all inheriting



13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/jsduck/inherit_doc.rb', line 13

def resolve_all
  @relations.each do |cls|
    resolve_class(cls) if cls[:inheritdoc]

    new_cfgs = []
    cls.all_local_members.each do |member|
      if member[:inheritdoc]
        resolve(member, new_cfgs)
      end
    end
    move_cfgs(cls, new_cfgs) if new_cfgs.length > 0
  end
end