Method: #template

Defined in:
lib/negroku/tasks/base.rb

#template(from, to) ⇒ Object

Wrapper method for quickly loading, rendering ERB templates and uploading them to the server.



3
4
5
6
# File 'lib/negroku/tasks/base.rb', line 3

def template(from, to)
  erb = File.read(File.expand_path("../templates/#{from}", __FILE__))
  put ERB.new(erb).result(binding), to
end