class GitHubChangelogGenerator::ChangelogGenerator
Main class and entry point for this script.
Public Class Methods
new()
click to toggle source
Class, responsible for whole changelog generation cycle @return initialised instance of ChangelogGenerator
# File lib/github_changelog_generator.rb, line 27 def initialize @options = Parser.parse_options @generator = Generator.new @options end
Public Instance Methods
run()
click to toggle source
The entry point of this script to generate changelog @raise (ChangelogGeneratorError
) Is thrown when one of specified tags was not found in list of tags.
# File lib/github_changelog_generator.rb, line 34 def run log = @generator.compound_changelog if @options.write_to_file? output_filename = @options[:output].to_s File.open(output_filename, "wb") { |file| file.write(log) } puts "Done!" puts "Generated log placed in #{Dir.pwd}/#{output_filename}" else puts log end end