Sha256: 2f67621888657d3d5ce4ef7c504fa8bf351f1f6946189df1a6697c317b33b98b

Contents?: true

Size: 419 Bytes

Versions: 3

Compression:

Stored size: 419 Bytes

Contents

require "erb"

module Prez
  module Builder
    include Prez::Helpers

    private

    def build_html(filename)
      say "Generating html..."
      reset_helpers!
      @_slide_contents = erb_eval filename
      erb_eval File.expand_path("../../../templates/build.html.tt", __FILE__)
    end

    def erb_eval(template)
      ERB.new(File.read(template), nil, "-", "@output_buffer").result(binding)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
prez-0.1.2 lib/prez/builder.rb
prez-0.1.1 lib/prez/builder.rb
prez-0.1.0 lib/prez/builder.rb