Class: Changi::Changelog
- Inherits:
-
Object
- Object
- Changi::Changelog
- Defined in:
- lib/changi/changelog.rb
Instance Method Summary collapse
-
#initialize(config) ⇒ Changelog
constructor
A new instance of Changelog.
- #new_entry ⇒ Object
- #render(demo: false) ⇒ Object
- #update ⇒ Object
Constructor Details
#initialize(config) ⇒ Changelog
Returns a new instance of Changelog.
3 4 5 |
# File 'lib/changi/changelog.rb', line 3 def initialize config @config = config end |
Instance Method Details
#new_entry ⇒ Object
7 8 9 |
# File 'lib/changi/changelog.rb', line 7 def new_entry entry_set.new_entry end |
#render(demo: false) ⇒ Object
11 12 13 14 15 |
# File 'lib/changi/changelog.rb', line 11 def render demo: false release = demo ? Release.demo : Release.build renderer = Renderer.new @config, entry_set, release renderer.render end |
#update ⇒ Object
17 18 19 20 21 |
# File 'lib/changi/changelog.rb', line 17 def update updater = @config.updater.new updater.update @config.changelog_path, render entry_set.destroy_all end |