class Repro::Response::RateLimit
Public Class Methods
from_response(response)
click to toggle source
# File lib/repro/response/rate_limit.rb, line 6 def self.from_response(response) return unless response new.tap do |rate_limit| headers = response.headers rate_limit.limit = headers["X-RateLimit-Limit"] rate_limit.remaining = headers["X-RateLimit-Remaining"] rate_limit.reset = headers["X-RateLimit-Reset"] end end