Skip to content

Commit

Permalink
Fix copy/paste bug in Error#ratelimit_remaining
Browse files Browse the repository at this point in the history
  • Loading branch information
sferik committed Apr 20, 2011
1 parent 7dbb866 commit b74861e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/twitter/error.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ def initialize(message, http_headers)
end

def ratelimit_reset
Time.at(@http_headers.values_at('x-ratelimit-reset', 'X-RateLimit-Reset').detect {|value| value }.to_i)
Time.at(@http_headers.values_at('x-ratelimit-reset', 'X-RateLimit-Reset').detect{|value| value}.to_i)
end

def ratelimit_limit
@http_headers.values_at('x-ratelimit-limit', 'X-RateLimit-Limit').detect {|value| value }.to_i
@http_headers.values_at('x-ratelimit-limit', 'X-RateLimit-Limit').detect{|value| value}.to_i
end

def ratelimit_remaining
@http_headers.values_at('x-ratelimit-limit', 'X-RateLimit-Limit').detect {|value| value }.to_i
@http_headers.values_at('x-ratelimit-remaining', 'X-RateLimit-Remaining').detect{|value| value}.to_i
end

def retry_after
Expand Down

0 comments on commit b74861e

Please sign in to comment.