Class: Singer::TemplatingMethods
- Inherits:
-
Object
- Object
- Singer::TemplatingMethods
- Defined in:
- lib/singer/templating_methods.rb
Overview
different ways to create output file from source template file
Class Method Summary collapse
Class Method Details
.copy(source_file, target_file) ⇒ Object
6 7 8 |
# File 'lib/singer/templating_methods.rb', line 6 def self.copy(source_file, target_file) FileUtils.cp(source_file, target_file) end |
.erb(source_file, target_file) ⇒ Object
10 11 12 |
# File 'lib/singer/templating_methods.rb', line 10 def self.erb(source_file, target_file) File.write(target_file, ERB.new(File.read(source_file)).result) end |