Class: RateLimiter::Configuration
- Inherits:
-
Object
- Object
- RateLimiter::Configuration
- Defined in:
- lib/rate_limiter/configuration.rb
Instance Attribute Summary collapse
-
#redis_options ⇒ Object
Returns the value of attribute redis_options.
-
#requests_per_minute ⇒ Object
Returns the value of attribute requests_per_minute.
-
#storage_type ⇒ Object
Returns the value of attribute storage_type.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
5 6 7 8 9 |
# File 'lib/rate_limiter/configuration.rb', line 5 def initialize @requests_per_minute = 60 @storage_type = :memory @redis_options = { host: 'localhost', port: 6379 } end |
Instance Attribute Details
#redis_options ⇒ Object
Returns the value of attribute redis_options.
3 4 5 |
# File 'lib/rate_limiter/configuration.rb', line 3 def @redis_options end |
#requests_per_minute ⇒ Object
Returns the value of attribute requests_per_minute.
3 4 5 |
# File 'lib/rate_limiter/configuration.rb', line 3 def requests_per_minute @requests_per_minute end |
#storage_type ⇒ Object
Returns the value of attribute storage_type.
3 4 5 |
# File 'lib/rate_limiter/configuration.rb', line 3 def storage_type @storage_type end |