Class: RhetButler::SlideLoader

Inherits:
Object
  • Object
show all
Defined in:
lib/rhet-butler/slide-loader.rb

Instance Method Summary collapse

Constructor Details

#initialize(slide_files, asset_files, configuration) ⇒ SlideLoader

Returns a new instance of SlideLoader.



9
10
11
12
13
14
15
16
17
18
# File 'lib/rhet-butler/slide-loader.rb', line 9

def initialize(slide_files, asset_files, configuration)
  @file_set = slide_files
  @asset_set = asset_files
  @named_filter_lists = configuration.named_filter_lists
  @default_content_filters = configuration.default_content_filters
  @default_note_filters = configuration.default_note_filters
  @root_slide = configuration.root_slide
  @root_group = SlideGroup.new
  @blueprint = configuration.arrangement_blueprint
end

Instance Method Details

#load_slidesObject



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/rhet-butler/slide-loader.rb', line 20

def load_slides
  root_group = SlideGroup.new
  includer = Includer.new
  includer.path = @root_slide
  root_group.slides = [includer]
  loading = FileLoading.new(@file_set)

  including = IncludeProcessor.new(loading)
  including.root_group = root_group
  including.traverse

  filter_resolver = FilterResolver.new
  filter_resolver.root_group = root_group
  filter_resolver.named_filter_lists = @named_filter_lists
  filter_resolver.default_content_filters = @default_content_filters
  filter_resolver.default_note_filters = @default_note_filters
  filter_resolver.traverse

  renderer = SlideRendering.new
  renderer.root_group = root_group
  renderer.file_set = @asset_set
  renderer.traverse

  return root_group
end