Class: ConfigTemplates::Outputs::Filesystem

Inherits:
Object
  • Object
show all
Defined in:
lib/config_templates/outputs/filesystem.rb

Instance Method Summary collapse

Instance Method Details

#write(component) ⇒ Object



3
4
5
6
7
# File 'lib/config_templates/outputs/filesystem.rb', line 3

def write(component)
  destination_path = component.destination_path
  ::FileUtils.mkdir_p ::File.dirname destination_path
  ::File.write destination_path, component.render
end