Sha256: b47798194c7cc06e2b62bd41ca165e5f7dde3d9277e1d424af214cd13aaef030

Contents?: true

Size: 701 Bytes

Versions: 43

Compression:

Stored size: 701 Bytes

Contents

require "forwardable"

require 'rabbit/theme/applier'

module Rabbit
  module Theme
    class Manager
      extend Forwardable

      def_delegators(:@canvas, :logger)
      
      attr_reader :canvas, :name
      def initialize(canvas, &callback)
        @canvas = canvas
        @applier = Applier.new(self, &callback)
        apply("base")
      end

      def apply(name)
        @name = name
        begin
          @applier.apply_theme(name)
        rescue ThemeExit
          logger.info($!.message) if $!.have_message?
        rescue StandardError, LoadError, SyntaxError
          logger.warn($!)
        end
      end
    
      def slides
        @canvas.slides
      end
    end
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
rabbit-3.0.3 lib/rabbit/theme/manager.rb
rabbit-3.0.2 lib/rabbit/theme/manager.rb
rabbit-3.0.1 lib/rabbit/theme/manager.rb
rabbit-3.0.0 lib/rabbit/theme/manager.rb
rabbit-2.2.1 lib/rabbit/theme/manager.rb
rabbit-2.2.0 lib/rabbit/theme/manager.rb
rabbit-2.1.9 lib/rabbit/theme/manager.rb
rabbit-2.1.8 lib/rabbit/theme/manager.rb
rabbit-2.1.7 lib/rabbit/theme/manager.rb
rabbit-2.1.6 lib/rabbit/theme/manager.rb
rabbit-2.1.5 lib/rabbit/theme/manager.rb
rabbit-2.1.4 lib/rabbit/theme/manager.rb
rabbit-2.1.3 lib/rabbit/theme/manager.rb
rabbit-2.1.2 lib/rabbit/theme/manager.rb
rabbit-2.1.1 lib/rabbit/theme/manager.rb
rabbit-2.1.0 lib/rabbit/theme/manager.rb
rabbit-2.0.9 lib/rabbit/theme/manager.rb
rabbit-2.0.8 lib/rabbit/theme/manager.rb
rabbit-2.0.7 lib/rabbit/theme/manager.rb
rabbit-2.0.6 lib/rabbit/theme/manager.rb