Class: TagChangelog::Generate
- Inherits:
-
Object
- Object
- TagChangelog::Generate
- Defined in:
- lib/tag_changelog/generate.rb
Defined Under Namespace
Classes: MessageList
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Generate
constructor
A new instance of Generate.
- #run ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Generate
8 9 10 11 12 13 14 15 |
# File 'lib/tag_changelog/generate.rb', line 8 def initialize( = {}) = @output = open_output_file = () @filter = Regexp.new([:filter], true) = set_commits_filter() @group = [:group] end |
Class Method Details
.run(options) ⇒ Object
4 5 6 |
# File 'lib/tag_changelog/generate.rb', line 4 def self.run() new().run end |
Instance Method Details
#run ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/tag_changelog/generate.rb', line 17 def run output << "# Changelog\n\n" .each_cons(2) do |current_tag, previous_tag| tag = Git::Tag.new(current_tag) = (previous_tag, current_tag) output << "## #{tag.version}" + " (#{tag.date})\n" output << .to_text output << "\n" end end |