Class: FileWriter

Inherits:
Writer show all
Defined in:
lib/gitlab-burndown/writer/file.rb

Instance Method Summary collapse

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