Class: RevealCK::Slide

Inherits:
Object
  • Object
show all
Includes:
Retrieve
Defined in:
lib/reveal-ck/slide.rb

Overview

Public: A Slide produces HTML output to be included in a presentation. Presently, this output is based upon a template.

Instance Method Summary collapse

Methods included from Retrieve

included, #retrieve

Constructor Details

#initialize(args) ⇒ Slide

Returns a new instance of Slide.



8
9
10
11
12
13
14
# File 'lib/reveal-ck/slide.rb', line 8

def initialize(args)
  template = retrieve(:template, args)
  config = args[:config] || {}
  file = Templates::Finder.new.find template
  @template = Templates::Processor.open(file: file, config: config)
  @variables = args
end

Instance Method Details

#htmlObject



16
17
18
# File 'lib/reveal-ck/slide.rb', line 16

def html
  @template.output(@variables)
end