Sha256: 94e4a1f6fca667ddd14e2ee04ae1051c8aaeb9ad79fc303f63ff392ab035cc21
Contents?: true
Size: 700 Bytes
Versions: 4
Compression:
Stored size: 700 Bytes
Contents
module Rack; module Throttle ### # This is the base class for matcher implementations. # Implementations are provided for User Agent, URL, and request # method. Subclass Matcher if you want to provide a custom # implementation. class Matcher attr_reader :rule def initialize(rule) @rule = rule end # Must be implemented in a subclass. # MUST return true or false. # @return [Boolean] # @abstract def match? true end # Must be implemented in a subclass. # Used to produce a unique key in our cache store. # Typically of the form "xx-" # @return [String] # @abstract def identifier "" end end end; end
Version data entries
4 entries across 4 versions & 2 rubygems