Sha256: 4125ff489e1d67b76b2ddafd9972b846974c7c359d2b0b284b800175da48bb5b

Contents?: true

Size: 291 Bytes

Versions: 11

Compression:

Stored size: 291 Bytes

Contents

module Quaderno::Helpers
  module RateLimit

    def rate_limit_info=(response)
      @rate_limit_info = { reset: response.headers['x-ratelimit-reset'].to_i, remaining: response.headers["x-ratelimit-remaining"].to_i }
    end

    def rate_limit_info
      @rate_limit_info
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
quaderno-3.0.1 lib/quaderno-ruby/helpers/rate_limit.rb
quaderno-3.0.0 lib/quaderno-ruby/helpers/rate_limit.rb
quaderno-2.2.0 lib/quaderno-ruby/helpers/rate_limit.rb
quaderno-2.1.3 lib/quaderno-ruby/helpers/rate_limit.rb
quaderno-2.1.2 lib/quaderno-ruby/helpers/rate_limit.rb
quaderno-2.1.1 lib/quaderno-ruby/helpers/rate_limit.rb
quaderno-2.1.0 lib/quaderno-ruby/helpers/rate_limit.rb
quaderno-2.0.2 lib/quaderno-ruby/helpers/rate_limit.rb
quaderno-2.0.1 lib/quaderno-ruby/helpers/rate_limit.rb
quaderno-1.17.1 lib/quaderno-ruby/helpers/rate_limit.rb
quaderno-1.17.0 lib/quaderno-ruby/helpers/rate_limit.rb