Class: Rack::Attack::Track
- Inherits:
-
Object
- Object
- Rack::Attack::Track
- Extended by:
- Forwardable
- Defined in:
- lib/rack/attack/track.rb
Instance Attribute Summary collapse
-
#filter ⇒ Object
readonly
Returns the value of attribute filter.
Instance Method Summary collapse
-
#initialize(name, options = {}, block) ⇒ Track
constructor
A new instance of Track.
Constructor Details
#initialize(name, options = {}, block) ⇒ Track
Returns a new instance of Track.
8 9 10 11 12 13 14 15 16 |
# File 'lib/rack/attack/track.rb', line 8 def initialize(name, = {}, block) [:type] = :track if [:limit] && [:period] @filter = Throttle.new(name, , block) else @filter = Check.new(name, , block) end end |
Instance Attribute Details
#filter ⇒ Object (readonly)
Returns the value of attribute filter.
6 7 8 |
# File 'lib/rack/attack/track.rb', line 6 def filter @filter end |