Sha256: 98cdc9e4e7d396db3607894c886baa3c0c22e6bd9cb6a9d1cf3f569f67f6015a

Contents?: true

Size: 385 Bytes

Versions: 5

Compression:

Stored size: 385 Bytes

Contents

module Wework

  class << self
    attr_accessor :config
    def configure
      yield config
    end

    def config
      @config ||= Config.new
    end

    def redis
      config.redis
    end

    def http_timeout_options
      config.http_timeout_options || {write: 2, connect: 5, read: 10}
    end
  end

  class Config
    attr_accessor :redis, :http_timeout_options
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
wework-0.2.6 lib/wework/config.rb
wework-0.2.5 lib/wework/config.rb
wework-0.2.4 lib/wework/config.rb
wework-0.2.3 lib/wework/config.rb
wework-0.2.2 lib/wework/config.rb