Module: MangUpdate::Templating
- Defined in:
- lib/MangUpdate/templating.rb
Class Method Summary collapse
Class Method Details
.init_template(options = {}) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/MangUpdate/templating.rb', line 7 def init_template( = {}) b = binding template_filename = File.join(File.dirname(__FILE__), "templates", "Mupfile.erb") template = ERB.new(File.read(template_filename)) template.filename = template_filename result = template.result(b) File.open([:mupfile], 'wb') do |f| f.puts(result) end end |