Sha256: b0affdbd5df309fde2328170c05c38979822e845659a2c0b6ea1bee23cd4495a

Contents?: true

Size: 671 Bytes

Versions: 7

Compression:

Stored size: 671 Bytes

Contents

class IMGKit
  class Configuration
    attr_accessor :meta_tag_prefix, :wkhtmltoimage, :default_options

    def initialize
      @meta_tag_prefix = 'imgkit-'
      @wkhtmltoimage = '/usr/local/bin/wkhtmltoimage'
      @default_options = {}
    end
  end

  class << self
    attr_accessor :configuration
  end

  # Configure IMGKit someplace sensible,
  # like config/initializers/imgkit.rb
  #
  # @example
  #   IMGKit.configure do |config|
  #     config.wkhtmltoimage = '/usr/bin/wkhtmltoimage'
  #   end
  
  def self.configuration
    @configuration ||= Configuration.new
  end
  
  
  def self.configure
    self.configuration 
    yield(configuration)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
imgkit-1.2.1 lib/imgkit/configuration.rb
imgkit-1.2.0 lib/imgkit/configuration.rb
imgkit-1.1.0 lib/imgkit/configuration.rb
imgkit-1.0.2 lib/imgkit/configuration.rb
imgkit-1.0.1 lib/imgkit/configuration.rb
imgkit-1.0.0 lib/imgkit/configuration.rb
imgkit-0.9.2 lib/imgkit/configuration.rb