Class: RevealCK::Slide

Inherits:
Object
  • Object
show all
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

Constructor Details

#initialize(args) ⇒ Slide

Returns a new instance of Slide.



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

def initialize(args)
  template = args[:template] || raise(':template is required')
  file = TemplateFinder.new.find template
  @template = TemplateProcessor.open file
  @variables = args
end

Instance Method Details

#htmlObject



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

def html
  @template.output({}, @variables)
end