Sha256: f11967e32be864b362e5857c17dcdfd81db70ee05abe3f28b0ecc9c10481c1c6

Contents?: true

Size: 240 Bytes

Versions: 56

Compression:

Stored size: 240 Bytes

Contents

require 'erubis'

def render_erb_template(template_path, vars={})
  raise "file '#{template_path}' not exists" unless File.exist? template_path

  template = File.open(template_path, 'r').read
  Erubis::Eruby.new(template).result(vars)
end

Version data entries

56 entries across 56 versions & 2 rubygems

Version Path
caploy-2.0.0 lib/caploy/render.rb
caploy-1.0.4 lib/caploy/render.rb
caploy-1.0.3 lib/caploy/render.rb
caploy-1.0.2 lib/caploy/render.rb
caploy-1.0.1 lib/caploy/render.rb
caploy-1.0.0 lib/caploy/render.rb
caploy-0.2.5 lib/caploy/render.rb
caploy-0.2.4 lib/caploy/render.rb
caploy-0.2.3 lib/caploy/render.rb
caploy-0.2.2 lib/caploy/render.rb
caploy-0.2.1 lib/caploy/render.rb
caploy-0.2.0 lib/caploy/render.rb
caploy-0.1.12 lib/caploy/render.rb
caploy-0.1.11 lib/caploy/render.rb
caploy-0.1.10 lib/caploy/render.rb
caploy-0.1.9 lib/caploy/render.rb
caploy-0.1.8 lib/caploy/render.rb
caploy-0.1.7 lib/caploy/render.rb
caploy-0.1.6 lib/caploy/render.rb
caploy-0.1.5 lib/caploy/render.rb