Class: RevealCK::Builders::IndexHtml
- Inherits:
-
Object
- Object
- RevealCK::Builders::IndexHtml
- Includes:
- Retrieve
- Defined in:
- lib/reveal-ck/builders/index_html.rb
Overview
Public: An IndexHtml knows how to build the index.html file (the core slides) within a reveal.js presentation.
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#slides_html ⇒ Object
readonly
Returns the value of attribute slides_html.
-
#template ⇒ Object
readonly
Returns the value of attribute template.
Instance Method Summary collapse
-
#initialize(args) ⇒ IndexHtml
constructor
A new instance of IndexHtml.
- #render ⇒ Object
Methods included from Retrieve
Constructor Details
#initialize(args) ⇒ IndexHtml
Returns a new instance of IndexHtml.
14 15 16 17 18 |
# File 'lib/reveal-ck/builders/index_html.rb', line 14 def initialize(args) @template = retrieve(:template, args) = retrieve(:slides_html, args) @config = retrieve(:config, args) end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
12 13 14 |
# File 'lib/reveal-ck/builders/index_html.rb', line 12 def config @config end |
#slides_html ⇒ Object (readonly)
Returns the value of attribute slides_html.
12 13 14 |
# File 'lib/reveal-ck/builders/index_html.rb', line 12 def end |
#template ⇒ Object (readonly)
Returns the value of attribute template.
12 13 14 |
# File 'lib/reveal-ck/builders/index_html.rb', line 12 def template @template end |
Instance Method Details
#render ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/reveal-ck/builders/index_html.rb', line 20 def render scope = RevealCK::Render::Scope.new(dir: Dir.pwd, config: config) tilt_template = Tilt.new(template) locals = { slides_html: } tilt_template.render(scope, locals) end |