Class: GraphAttack::Configuration
- Inherits:
-
Object
- Object
- GraphAttack::Configuration
- Defined in:
- lib/graph_attack/configuration.rb
Overview
Store the config
Instance Attribute Summary collapse
-
#interval ⇒ Object
Time interval in seconds.
-
#on ⇒ Object
Key on the context on which to differentiate users.
-
#redis_client ⇒ Object
Use a custom Redis client.
-
#threshold ⇒ Object
Number of calls allowed.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
18 19 20 21 22 23 |
# File 'lib/graph_attack/configuration.rb', line 18 def initialize @threshold = nil @interval = nil @on = :ip @redis_client = Redis.new end |
Instance Attribute Details
#interval ⇒ Object
Time interval in seconds.
10 11 12 |
# File 'lib/graph_attack/configuration.rb', line 10 def interval @interval end |
#on ⇒ Object
Key on the context on which to differentiate users.
13 14 15 |
# File 'lib/graph_attack/configuration.rb', line 13 def on @on end |
#redis_client ⇒ Object
Use a custom Redis client.
16 17 18 |
# File 'lib/graph_attack/configuration.rb', line 16 def redis_client @redis_client end |
#threshold ⇒ Object
Number of calls allowed.
7 8 9 |
# File 'lib/graph_attack/configuration.rb', line 7 def threshold @threshold end |