Class: RevealCK::PresentationBuilder

Inherits:
Builder
  • Object
show all
Defined in:
lib/reveal-ck/presentation_builder.rb

Overview

Public: A PresentationBuilder knows how to bundle together all of the various files that makeup a reveal.js presentation

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Builder

#add_task, #build!

Constructor Details

#initialize(args) ⇒ PresentationBuilder

Returns a new instance of PresentationBuilder.



13
14
15
16
17
18
19
20
# File 'lib/reveal-ck/presentation_builder.rb', line 13

def initialize(args)
  @image_files = args[:image_files]
  @slides_file = args[:slides_file]
  @presentation = args[:presentation]
  raise 'either :slides_file or :presentation is required' unless @slides_file || @presentation
  @output_dir = args[:output_dir]
  @config = args[:config]
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



10
11
12
# File 'lib/reveal-ck/presentation_builder.rb', line 10

def config
  @config
end

#image_filesObject (readonly)

Returns the value of attribute image_files.



10
11
12
# File 'lib/reveal-ck/presentation_builder.rb', line 10

def image_files
  @image_files
end

#slides_fileObject (readonly)

Returns the value of attribute slides_file.



10
11
12
# File 'lib/reveal-ck/presentation_builder.rb', line 10

def slides_file
  @slides_file
end

#tasksObject (readonly)

Returns the value of attribute tasks.



11
12
13
# File 'lib/reveal-ck/presentation_builder.rb', line 11

def tasks
  @tasks
end

Instance Method Details

#output_dir(child = nil) ⇒ Object



22
23
24
25
26
27
28
# File 'lib/reveal-ck/presentation_builder.rb', line 22

def output_dir(child=nil)
  if child
    File.join(@output_dir, child)
  else
    @output_dir
  end
end