Sha256: 6662b3df3c72ac6aa4b2340d49463cf76ba90f383809cac09d828b73623db9ca

Contents?: true

Size: 235 Bytes

Versions: 5

Compression:

Stored size: 235 Bytes

Contents

module RailsRateLimiter
  # Provides results of rate limiting
  class Result
    attr_reader :time_left

    def initialize(time_left)
      @time_left = time_left
    end

    def limit_exceeded?
      time_left > 0
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rails_rate_limiter-0.3.0 lib/rails_rate_limiter/result.rb
rails_rate_limiter-0.2.1 lib/rails_rate_limiter/result.rb
rails_rate_limiter-0.1.3 lib/rails_rate_limiter/result.rb
rails_rate_limiter-0.1.2 lib/rails_rate_limiter/result.rb
rails_rate_limiter-0.1.1 lib/rails_rate_limiter/result.rb