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-next-1.2.6 lib/wework/config.rb
wework-1.2.8 lib/wework/config.rb
wework-1.2.5 lib/wework/config.rb
wework-1.2.3 lib/wework/config.rb
wework-1.2.2 lib/wework/config.rb
wework-1.2.1 lib/wework/config.rb
wework-1.2.0 lib/wework/config.rb
wework-1.1.9 lib/wework/config.rb
wework-1.1.8 lib/wework/config.rb
wework-1.1.7 lib/wework/config.rb
wework-1.1.6 lib/wework/config.rb
wework-1.1.5 lib/wework/config.rb
wework-1.1.3 lib/wework/config.rb
wework-1.1.2 lib/wework/config.rb
wework-1.1.1 lib/wework/config.rb
wework-1.1.0 lib/wework/config.rb
wework-0.3.4 lib/wework/config.rb
wework-0.3.3 lib/wework/config.rb
wework-0.3.2 lib/wework/config.rb
wework-0.3.1 lib/wework/config.rb