Class: ConventionalChangelog::Writer
- Inherits:
-
File
- Object
- File
- ConventionalChangelog::Writer
- Defined in:
- lib/conventional_changelog/writer.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(file_name) ⇒ Writer
constructor
A new instance of Writer.
- #write!(options) ⇒ Object
Constructor Details
#initialize(file_name) ⇒ Writer
Returns a new instance of Writer.
3 4 5 6 |
# File 'lib/conventional_changelog/writer.rb', line 3 def initialize(file_name) @previous_body = File.open(file_name, "a+").read super file_name, "w" end |
Instance Method Details
#write!(options) ⇒ Object
8 9 10 11 |
# File 'lib/conventional_changelog/writer.rb', line 8 def write!() write_new_lines self.puts @previous_body end |