Class: FileWriter
Instance Method Summary collapse
-
#initialize(filepath) ⇒ FileWriter
constructor
A new instance of FileWriter.
- #write(content) ⇒ Object
Constructor Details
#initialize(filepath) ⇒ FileWriter
Returns a new instance of FileWriter.
4 5 6 7 |
# File 'lib/gitlab-burndown/writer/file.rb', line 4 def initialize(filepath) super() @filepath = filepath end |
Instance Method Details
#write(content) ⇒ Object
9 10 11 12 13 |
# File 'lib/gitlab-burndown/writer/file.rb', line 9 def write(content) File.open(@filepath, 'w') do |file| file.write content end end |