Class: JsDuck::InheritDoc
- Inherits:
-
Object
- Object
- JsDuck::InheritDoc
- Defined in:
- lib/jsduck/inherit_doc.rb
Overview
Deals with inheriting documentation
Instance Method Summary collapse
-
#initialize(relations) ⇒ InheritDoc
constructor
A new instance of InheritDoc.
-
#resolve_all ⇒ Object
Performs all inheriting.
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_all ⇒ Object
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 |