Method: Filander::CreateFile#create_file

Defined in:
lib/filander/actions/create_file.rb

#create_file(destination, content) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/filander/actions/create_file.rb', line 5

def create_file(destination, content)
  create_directory_for destination

  with_report destination, content do
    File.open(join_destination(destination), "w") { |file| file << content }
  end
end