Sha256: 1b5a9492413fe41c514af24110a3de7112cb14381fb787bda64b3a1be03e9110
Contents?: true
Size: 403 Bytes
Versions: 7
Compression:
Stored size: 403 Bytes
Contents
module Subtrac class Template def initialize(template) @template = template end def render(binding) ERB.new(IO.read(@template)).result(binding) end def write(outfile,binding) file = File.open(outfile, 'w+') if file file.syswrite(render(binding)) else raise "Unable to open file for writing. file #{outfile}" end end end end
Version data entries
7 entries across 7 versions & 1 rubygems