Module: Coco::FileWriter
Overview
Public: I write a single file.
Instance Method Summary collapse
-
#write(filename, content) ⇒ Object
Public: Write a file.
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 |