Sha256: a0e3a270bc183220474262378e10d5c7da4133eed87e4627b73fbd14dfc7423d

Contents?: true

Size: 1.47 KB

Versions: 4

Compression:

Stored size: 1.47 KB

Contents

require 'rhet-butler/yaml-schema'
require 'rhet-butler/file-loading'
require 'rhet-butler/include-processor'
require 'rhet-butler/slide-rendering'
require 'rhet-butler/filter-resolver'

module RhetButler
  class SlideLoader
    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

    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
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rhet-butler-0.14.1 lib/rhet-butler/slide-loader.rb
rhet-butler-0.14.0 lib/rhet-butler/slide-loader.rb
rhet-butler-0.13.0 lib/rhet-butler/slide-loader.rb
rhet-butler-0.12.1 lib/rhet-butler/slide-loader.rb