FIX: Ruby 2.2 has `include` as private

This commit is contained in:
Robin Ward 2015-04-21 13:35:00 -04:00
parent 2713b77e28
commit dd3953bf19
1 changed files with 3 additions and 8 deletions

View File

@ -23,16 +23,11 @@ class RateLimiter
def self.included(base) def self.included(base)
base.extend(ClassMethods) base.extend(ClassMethods)
base.include(InstanceMethods)
end end
module InstanceMethods # For the lifetime of this instance, don't enforce rate limits.
def disable_rate_limits!
# For the lifetime of this instance, don't enforce rate limits. @rate_limits_disabled = true
def disable_rate_limits!
@rate_limits_disabled = true
end
end end
module ClassMethods module ClassMethods