Class: Changi::Updater::PrependUpdater
- Inherits:
-
Object
- Object
- Changi::Updater::PrependUpdater
- Defined in:
- lib/changi/updater/prepend_updater.rb
Instance Method Summary collapse
Instance Method Details
#update(changelog_path, release_data) ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/changi/updater/prepend_updater.rb', line 4 def update changelog_path, release_data previous = File.read changelog_path if File.exist? changelog_path File.open changelog_path, 'w' do |fd| fd.puts release_data fd.puts fd.puts previous if previous end end |