Class: Omnibus::ChangeLogPrinter

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

Instance Method Summary collapse

Constructor Details

#initialize(changelog, diff, source_path = "../") ⇒ ChangeLogPrinter

Returns a new instance of ChangeLogPrinter.



4
5
6
7
8
# File 'lib/omnibus/changelog_printer.rb', line 4

def initialize(changelog, diff, source_path = "../")
  @changelog = changelog
  @diff = diff
  @source_path = source_path
end

Instance Method Details



10
11
12
13
14
15
16
17
18
# File 'lib/omnibus/changelog_printer.rb', line 10

def print(new_version)
  puts "## #{new_version} (#{Time.now.strftime("%Y-%m-%d")})"
  print_changelog
  unless diff.empty?
    print_components
    puts ""
  end
  print_contributors
end