Module: Coco::FileWriter

Defined in:
lib/coco/writer/file_writer.rb

Overview

Public: I write a single file.

Class Method Summary collapse

Class 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.



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

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