Method: ModuleSync::Renderer.sync
- Defined in:
- lib/modulesync/renderer.rb
.sync(template, target_name) ⇒ Object
33 34 35 36 37 38 39 |
# File 'lib/modulesync/renderer.rb', line 33 def self.sync(template, target_name) path = target_name.rpartition('/').first FileUtils.mkdir_p(path) unless path.empty? File.open(target_name, 'w') do |file| file.write(template) end end |