require 'singleton' module Biro class Configuration include Singleton attr_accessor :environment, :logger def logger @logger ||= Logger.new(STDOUT) end def development! @environment = :development end def development? @environment == :development end def gateway(name, options = {}) klass_name = Biro::Utils.camelize(name.to_s) + '::Request' klass = Biro.const_get(klass_name) Biro.gateways[name] = klass.new(options) end end end