Class: GitHubChangelogGenerator::ChangelogGenerator
- Inherits:
-
Object
- Object
- GitHubChangelogGenerator::ChangelogGenerator
- Defined in:
- lib/github_changelog_generator.rb
Overview
Main class and entry point for this script.
Instance Method Summary collapse
-
#initialize(params = ARGV) ⇒ Object
constructor
Class, responsible for whole changelog generation cycle.
-
#run ⇒ Object
The entry point of this script to generate changelog.
Constructor Details
Instance Method Details
#run ⇒ Object
The entry point of this script to generate changelog
32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/github_changelog_generator.rb', line 32 def run log = generator.compound_changelog if .write_to_file? output_filename = [:output].to_s File.open(output_filename, "wb") { |file| file.write(log) } puts "Done!" puts "Generated log placed in #{File.absolute_path(output_filename)}" else puts log end end |