Class: Renogen::Generator

Inherits:
Object
  • Object
show all
Defined in:
lib/renogen/generator.rb

Overview

This is the conductor of the application

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(version, source, output_format, options = {}) ⇒ Generator

Returns a new instance of Generator.



6
7
8
9
10
11
# File 'lib/renogen/generator.rb', line 6

def initialize(version, source, output_format, options={})
  @version = version
  @source = source
  @output_format = output_format
  @options = options
end

Instance Attribute Details

#optionsObject

Returns the value of attribute options.



4
5
6
# File 'lib/renogen/generator.rb', line 4

def options
  @options
end

#output_formatObject

Returns the value of attribute output_format.



4
5
6
# File 'lib/renogen/generator.rb', line 4

def output_format
  @output_format
end

#sourceObject

Returns the value of attribute source.



4
5
6
# File 'lib/renogen/generator.rb', line 4

def source
  @source
end

#versionObject

Returns the value of attribute version.



4
5
6
# File 'lib/renogen/generator.rb', line 4

def version
  @version
end

Instance Method Details

#generate!Object

Create the change log



14
15
16
17
18
19
20
# File 'lib/renogen/generator.rb', line 14

def generate!
  changelog = extraction_stratagy.extract
  changelog.version = version
  changelog.date = options['release_date']

  writer.write!(changelog)
end