Class: Pact::Doc::Generator
- Inherits:
-
Object
- Object
- Pact::Doc::Generator
- Defined in:
- lib/pact/doc/generator.rb
Direct Known Subclasses
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(pact_dir, doc_dir, options) ⇒ Generator
constructor
A new instance of Generator.
Constructor Details
#initialize(pact_dir, doc_dir, options) ⇒ Generator
Returns a new instance of Generator.
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/pact/doc/generator.rb', line 9 def initialize pact_dir, doc_dir, @doc_dir = doc_dir @pact_dir = pact_dir @consumer_contract_renderer = [:consumer_contract_renderer] @doc_type = [:doc_type] @file_extension = [:file_extension] @index_renderer = [:index_renderer] @index_name = [:index_name] @after = .fetch(:after, lambda{|pact_dir, target_dir, consumer_contracts| }) end |
Instance Method Details
#call ⇒ Object
20 21 22 23 24 25 |
# File 'lib/pact/doc/generator.rb', line 20 def call ensure_target_dir_exists_and_is_clean write_index if consumer_contracts.any? write_doc_files perform_after_hook end |