module Feeder

Constants

VERSION

Public Class Methods

config() click to toggle source
# File lib/feeder.rb, line 10
def config
  @configuration ||= Feeder::Configuration.new
end
configure() { |config| ... } click to toggle source
# File lib/feeder.rb, line 14
def configure
  yield config if block_given?
end
temporarily(options = {}) { || ... } click to toggle source

Set temporary configuration options for the duration of the given block.

options - A Hash describing temporary configuration options.

# File lib/feeder.rb, line 21
def temporarily options = {}
  original = @configuration.dup

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

  yield
ensure
  @configuration = original
end