Sha256: 50ded66970029d5cd4475bcb54038d5ab3db237ce73bc71e2bb6dbcb94777562
Contents?: true
Size: 439 Bytes
Versions: 18
Compression:
Stored size: 439 Bytes
Contents
module Github class RatelimitStatus include Github::Constants attr_reader :ratelimit_limit, :ratelimit_remaining def initialize(env) @env = env @ratelimit_limit = env[:response_headers][RATELIMIT_LIMIT] @ratelimit_remaining = env[:response_headers][RATELIMIT_REMAINING] end def ratelimit_reset_time @ratelimit_reset_time ||= Time.parse(@env[:reponse_headers]['date']) end end end
Version data entries
18 entries across 18 versions & 1 rubygems