Class: Yarrow::Generator
- Inherits:
-
Object
- Object
- Yarrow::Generator
- Defined in:
- lib/yarrow/generator.rb
Overview
Generates documentation from a model.
Instance Method Summary collapse
-
#initialize(config) ⇒ Generator
constructor
A new instance of Generator.
- #process(&block) ⇒ Object
Constructor Details
#initialize(config) ⇒ Generator
Returns a new instance of Generator.
38 39 40 41 |
# File 'lib/yarrow/generator.rb', line 38 def initialize(config) @config = config @workflow = Process::Workflow.new(config) end |
Instance Method Details
#process(&block) ⇒ Object
43 44 45 46 47 48 49 50 51 |
# File 'lib/yarrow/generator.rb', line 43 def process(&block) workflow.connect(ScanSource.new) workflow.connect(ExpandCollections.new) workflow.connect(FlattenManifest.new) workflow.process do |result| block.call(result) end end |