Sha256: 89a2e72b2c040fcf1e7a4875844e3ef974c72f5be72e90e299ab6a5a0c390d88

Contents?: true

Size: 490 Bytes

Versions: 3

Compression:

Stored size: 490 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

    def expired_shift_seconds
      config.expired_shift_seconds || 100
    end
  end

  class Config
    attr_accessor :redis, :http_timeout_options, :expired_shift_seconds
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
wework-0.2.9 lib/wework/config.rb
wework-0.2.8 lib/wework/config.rb
wework-0.2.7 lib/wework/config.rb