Module: RevealCK::Render::IndexHtmlMaker

Included in:
Scope
Defined in:
lib/reveal-ck/render/index_html_maker.rb

Overview

An IndexHtml is made by composed head, body, and script.

Instance Method Summary collapse

Instance Method Details

#body(slides_html) ⇒ Object



15
16
17
18
19
20
21
22
23
24
# File 'lib/reveal-ck/render/index_html_maker.rb', line 15

def body(slides_html)
  body_html_erb =
    RevealCK.template_path('index.html',
                           'body.html.erb')
  template = Tilt.new(body_html_erb)
  locals = {
    slides_html: slides_html
  }
  template.render(self, locals)
end

#headObject



7
8
9
10
11
12
13
# File 'lib/reveal-ck/render/index_html_maker.rb', line 7

def head
  head_html_erb =
    RevealCK.template_path('index.html',
                           'head.html.erb')
  template = Tilt.new(head_html_erb)
  template.render(self)
end

#scriptObject



26
27
28
29
30
31
32
# File 'lib/reveal-ck/render/index_html_maker.rb', line 26

def script
  script_js_erb =
    RevealCK.template_path('index.html',
                           'script.js.erb')
  template = Tilt.new(script_js_erb)
  template.render(self)
end