Sha256: f7913362b64ce48175900efe1b977447d5d91f725a7adcabbeb3ced3b7be107b

Contents?: true

Size: 687 Bytes

Versions: 1

Compression:

Stored size: 687 Bytes

Contents

require "feeder/engine"
require "feeder/configuration"
require "feeder/concerns"
require "feeder/active_record"
require "kaminari"

module Feeder

  class << self
    def config
      @configuration ||= Feeder::Configuration.new
    end

    def configure
      yield config if block_given?
    end

    # Set temporary configuration options for the duration of the given block.
    #
    # options - A Hash describing temporary configuration options.
    def temporarily options = {}
      original = @configuration.dup

      options.each do |key, value|
        @configuration.send "#{key}=", value
      end

      yield
    ensure
      @configuration = original
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
feeder-0.5.1 lib/feeder.rb