Method: Expansions::ERBTemplateFile#process

Defined in:
lib/expansions/erb_template_file.rb

#process(args) ⇒ Object



24
25
26
27
28
29
30
31
# File 'lib/expansions/erb_template_file.rb', line 24

def process(args)
  template = prepare_template(File.read(args[:input]))
  result = process_template(template,args[:binding])

  File.open_for_write(args[:output]) do|file|
    file.write(result)
  end
end