Sha256: f4e91a6800be10ae2cb0a0d68b937a804cedf5d40c7e16e6249a937ab86c9aed

Contents?: true

Size: 534 Bytes

Versions: 4

Compression:

Stored size: 534 Bytes

Contents

require 'rhet-butler/slide-renderer'
require 'rhet-butler/slide-traverser'
module RhetButler
  class SlideRendering < SlideTraverser
    attr_accessor :root_group

    def setup
      descend(@root_group, @root_group)
    end

    def on_slide(slide)
      slide.content = filter_text(slide.content, slide.content_filters)
      slide.notes = filter_text(slide.notes, slide.note_filters)
    end

    def filter_text(text, filters)
      filters.inject(text) do |text, filter|
        filter.process(text)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rhet-butler-0.11.1 lib/rhet-butler/slide-rendering.rb
rhet-butler-0.11.0 lib/rhet-butler/slide-rendering.rb
rhet-butler-0.10.0 lib/rhet-butler/slide-rendering.rb
rhet-butler-0.9.0 lib/rhet-butler/slide-rendering.rb