Class: JsDuck::Process::Versions
- Inherits:
-
Object
- Object
- JsDuck::Process::Versions
- Defined in:
- lib/jsduck/process/versions.rb
Overview
Generates @since and @new tags by importing JSDuck exports of older versions of the same project and looking in which version a class or method first appeared.
Instance Method Summary collapse
-
#initialize(relations, opts = OpenStruct.new, importer = Process::Importer.new) ⇒ Versions
constructor
A new instance of Versions.
-
#process_all! ⇒ Object
Loads in exported docs and generates @since and @new tags.
Constructor Details
#initialize(relations, opts = OpenStruct.new, importer = Process::Importer.new) ⇒ Versions
Returns a new instance of Versions.
11 12 13 14 15 |
# File 'lib/jsduck/process/versions.rb', line 11 def initialize(relations, opts=OpenStruct.new, importer=Process::Importer.new) @relations = relations @opts = opts @importer = importer end |
Instance Method Details
#process_all! ⇒ Object
Loads in exported docs and generates @since and @new tags.
18 19 20 21 22 23 |
# File 'lib/jsduck/process/versions.rb', line 18 def process_all! if @opts.import.length > 0 @versions = @importer.import(@opts.import) end end |