Module: Coco::FileWriter

Extended by:
FileWriter
Included in:
FileWriter
Defined in:
lib/coco/writer/file_writer.rb

Overview

Public: I write a single file.

Instance Method Summary collapse

Instance Method Details

#write(filename, content) ⇒ Object

Public: Write a file.

filename - String path+name of the file. content - String content to put in the file.

Returns nothing.



15
16
17
# File 'lib/coco/writer/file_writer.rb', line 15

def write(filename, content)
  File.open(filename, 'w') {|file| file.write(content) }
end