Sha256: e5713630d4dd7668f73f2c0a9d09b107559221548b1375d5e4aa37a7c4e500c3

Contents?: true

Size: 729 Bytes

Versions: 18

Compression:

Stored size: 729 Bytes

Contents

require 'tilt'

module RevealCK
  module Builders
    #
    # Public: An IndexHtml knows how to build the index.html file (the
    # core slides) within a reveal.js presentation.
    #
    class IndexHtml
      include Retrieve

      attr_reader :template, :slides_html, :config

      def initialize(args)
        @template = retrieve(:template, args)
        @slides_html = retrieve(:slides_html, args)
        @config = retrieve(:config, args)
      end

      def render
        scope = RevealCK::Render::Scope.new(dir: Dir.pwd, config: config)
        tilt_template = Tilt.new(template)
        locals = {
          slides_html: slides_html
        }
        tilt_template.render(scope, locals)
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
reveal-ck-4.0.0 lib/reveal-ck/builders/index_html.rb
reveal-ck-3.5.1 lib/reveal-ck/builders/index_html.rb
reveal-ck-3.5.0 lib/reveal-ck/builders/index_html.rb
reveal-ck-3.4.0 lib/reveal-ck/builders/index_html.rb
reveal-ck-3.3.1 lib/reveal-ck/builders/index_html.rb
reveal-ck-3.3.0 lib/reveal-ck/builders/index_html.rb
reveal-ck-3.2.0 lib/reveal-ck/builders/index_html.rb
reveal-ck-3.1.0 lib/reveal-ck/builders/index_html.rb
reveal-ck-3.0.1 lib/reveal-ck/builders/index_html.rb
reveal-ck-3.0.0 lib/reveal-ck/builders/index_html.rb
reveal-ck-0.6.2 lib/reveal-ck/builders/index_html.rb
reveal-ck-0.6.1 lib/reveal-ck/builders/index_html.rb
reveal-ck-0.6.0 lib/reveal-ck/builders/index_html.rb
reveal-ck-0.5.1 lib/reveal-ck/builders/index_html.rb
reveal-ck-0.5.0 lib/reveal-ck/builders/index_html.rb
reveal-ck-0.4.2 lib/reveal-ck/builders/index_html.rb
reveal-ck-0.4.1 lib/reveal-ck/builders/index_html.rb
reveal-ck-0.4.0 lib/reveal-ck/builders/index_html.rb