Sha256: 61d44c64de49f244869a42b94f182c1f81be437cf16c2f382a5615c060a70d11

Contents?: true

Size: 595 Bytes

Versions: 4

Compression:

Stored size: 595 Bytes

Contents

# coding: utf-8

module ThinReports
  module Generator
    
    class Configuration
      # @return [Symbol]
      attr_reader :default
      
      def initialize
        @default = :pdf
      end
      
      # @return [ThinReports::Generator::PDF::Configuration]
      def pdf
        @pdf ||= PDF::Configuration.new
      end
      
      # @param [Symbol] type
      # @return [void]
      def default=(type)
        unless Generator.registry.key?(type)
          raise ThinReports::Errors::UnknownGeneratorType.new(type)
        end
        @default = type
      end
    end
    
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
thinreports-0.7.7 lib/thinreports/generator/configuration.rb
thinreports-0.7.6 lib/thinreports/generator/configuration.rb
thinreports-0.7.5 lib/thinreports/generator/configuration.rb
thinreports-0.7.0 lib/thinreports/generator/configuration.rb