Skip to content
Browse files

Remove deprecated `RateLimit.instance` method

  • Loading branch information...
1 parent c30eb4c commit bf08485942428c26ba595c4e092dcdac1ec823ff @sferik committed Sep 6, 2012
Showing with 1 addition and 14 deletions.
  1. +1 −1 README.md
  2. +0 −6 lib/twitter/rate_limit.rb
  3. +0 −7 spec/twitter/rate_limit_spec.rb
View
2 README.md
@@ -273,7 +273,7 @@ Here are some fun facts about the 3.0 release:
* The entire library is implemented in just 2,000 lines of code
* With over 5,000 lines of specs, the spec-to-code ratio is over 2.5:1
-* The spec suite contains 668 examples and runs in under 2 seconds on a MacBook
+* The spec suite contains 667 examples and runs in under 2 seconds on a MacBook
* This project has 100% C0 code coverage (the tests execute every line of
source code at least once)
* At the time of release, this library is comprehensive: you can request all
View
6 lib/twitter/rate_limit.rb
@@ -3,12 +3,6 @@ class RateLimit
attr_reader :attrs
alias to_hash attrs
- # @deprecated This method exists to provide backwards compatibility to when
- # Twitter::RateLimit was a singleton. Safe to remove in version 4.
- def self.instance
- Twitter.rate_limit
- end
-
# @return [Twitter::RateLimit]
def initialize(attrs={})
@attrs = attrs
View
7 spec/twitter/rate_limit_spec.rb
@@ -2,13 +2,6 @@
describe Twitter::RateLimit do
- describe ".instance" do
- it "delegates to Twitter.rate_limit" do
- rate_limit = Twitter::RateLimit.instance
- rate_limit.should eq Twitter.rate_limit
- end
- end
-
describe "#limit" do
it "returns an Integer when x-rate-limit-limit header is set" do
rate_limit = Twitter::RateLimit.new('x-rate-limit-limit' => "150")

0 comments on commit bf08485

Please sign in to comment.
Something went wrong with that request. Please try again.