Class: GitHubChangelogGenerator::ChangelogGenerator

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

Overview

Main class and entry point for this script.

Instance Method Summary collapse

Constructor Details

#initializeObject

Class, responsible for whole change log generation cycle


21
22
23
24
# File 'lib/github_changelog_generator.rb', line 21

def initialize
  @options = Parser.parse_options
  @generator = Generator.new @options
end

Instance Method Details

#runObject

The entry point of this script to generate change log

Raises:


28
29
30
31
32
33
34
35
# File 'lib/github_changelog_generator.rb', line 28

def run
  log = @generator.compound_changelog

  output_filename = (@options[:output]).to_s
  File.open(output_filename, "w") { |file| file.write(log) }
  puts "Done!"
  puts "Generated log placed in #{Dir.pwd}/#{output_filename}"
end