lib/kitabu/exporter/base.rb
def render_template(file, locals = {})
        context = OpenStruct.new(locals).extend(Helpers)
        data = context.instance_eval { binding }
        ERB.new(File.read(file), trim_mode: "%<>", eoutvar: "@_output").result(data)
      end
# Render a eRb template using +locals+ as data seed.
#
Render a eRb template using +locals+ as data seed.
Render a eRb template using + locals + as data seed .
def render_template(file, locals = {})
        context = OpenStruct.new(locals).extend(Helpers)
        data = context.instance_eval { binding }
        ERB.new(File.read(file), trim_mode: "%<>", eoutvar: "@_output").result(data)
      end
def render_template ( file , locals = { } ) context = OpenStruct . new ( locals ) . extend ( Helpers ) data = context . instance_eval { binding } ERB . new ( File . read ( file ) , trim_mode : "%<>" , eoutvar : "@_output" ) . result ( data ) end
Render a eRb template using +locals+ as data seed.
Render a eRb template using + locals + as data seed .
file
locals