Module: Gryphon::Processors::FileWriter

Included in:
AssetProcessor, MustacheProcessor, SassProcessor
Defined in:
lib/gryphon/processors/file_writer.rb

Instance Method Summary collapse

Instance Method Details

#copy_file(src, dest) ⇒ Object

Parameters:

  • src (Pathname)
  • dest (Pathname)


15
16
17
18
# File 'lib/gryphon/processors/file_writer.rb', line 15

def copy_file(src, dest)
  dest.dirname.mkpath
  FileUtils.copy_file(src, dest)
end

#write_file(path, content) ⇒ Object

Parameters:

  • path (Pathname)
  • content (String)


8
9
10
11
# File 'lib/gryphon/processors/file_writer.rb', line 8

def write_file(path, content)
  path.dirname.mkpath
  path.write(content)
end