Class: Renogen::Generator
- Inherits:
-
Object
- Object
- Renogen::Generator
- Defined in:
- lib/renogen/generator.rb
Overview
This is the conductor of the application
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
-
#output_format ⇒ Object
Returns the value of attribute output_format.
-
#source ⇒ Object
Returns the value of attribute source.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
-
#generate! ⇒ Object
Create the change log.
-
#initialize(version, source, output_format, options = {}) ⇒ Generator
constructor
A new instance of Generator.
Constructor Details
#initialize(version, source, output_format, options = {}) ⇒ Generator
Returns a new instance of Generator.
8 9 10 11 12 13 |
# File 'lib/renogen/generator.rb', line 8 def initialize(version, source, output_format, = {}) @version = version @source = source @output_format = output_format @options = end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
6 7 8 |
# File 'lib/renogen/generator.rb', line 6 def @options end |
#output_format ⇒ Object
Returns the value of attribute output_format.
6 7 8 |
# File 'lib/renogen/generator.rb', line 6 def output_format @output_format end |
#source ⇒ Object
Returns the value of attribute source.
6 7 8 |
# File 'lib/renogen/generator.rb', line 6 def source @source end |
#version ⇒ Object
Returns the value of attribute version.
6 7 8 |
# File 'lib/renogen/generator.rb', line 6 def version @version end |
Instance Method Details
#generate! ⇒ Object
Create the change log
16 17 18 19 20 21 22 23 |
# File 'lib/renogen/generator.rb', line 16 def generate! changelog = extraction_stratagy.extract changelog.version = version changelog.date = ['release_date'] validator.validate!(changelog) if ['allowed_values']&.any? writer.write!(changelog) end |