Methods

Yapra::Plugin::ErbApplier

Public Instance Methods

apply_template(template, apply_binding=binding) click to toggle source
# File lib/yapra/plugin/erb_applier.rb, line 6
def apply_template template, apply_binding=binding
  if template.index('file://') == 0
    path = URI.parse(template).path
    open(path) do |io|
      template = io.read
    end
  end
  ERB.new(template, nil, '-').result(apply_binding)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.