Sha256: b87b3cda369f7efd919a6b4e683a1e7124812b54760ad6d8cffa7fe3904bacb1

Contents?: true

Size: 464 Bytes

Versions: 21

Compression:

Stored size: 464 Bytes

Contents

module Wework

  class << self
    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

21 entries across 21 versions & 2 rubygems

Version Path
wework-0.3.0 lib/wework/config.rb