Class: SpeedLimiter::Config
- Inherits:
-
Object
- Object
- SpeedLimiter::Config
- Defined in:
- lib/speed_limiter/config.rb
Overview
config model
Instance Attribute Summary collapse
-
#no_limit ⇒ Object
(also: #no_limit?)
Returns the value of attribute no_limit.
-
#prefix ⇒ Object
Returns the value of attribute prefix.
-
#redis ⇒ Object
Returns the value of attribute redis.
-
#redis_url ⇒ Object
Returns the value of attribute redis_url.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
8 9 10 11 12 13 |
# File 'lib/speed_limiter/config.rb', line 8 def initialize @redis_url = "redis://localhost:6379/0" @redis = nil @no_limit = false @prefix = "speed_limiter" end |
Instance Attribute Details
#no_limit ⇒ Object Also known as: no_limit?
Returns the value of attribute no_limit.
6 7 8 |
# File 'lib/speed_limiter/config.rb', line 6 def no_limit @no_limit end |
#prefix ⇒ Object
Returns the value of attribute prefix.
6 7 8 |
# File 'lib/speed_limiter/config.rb', line 6 def prefix @prefix end |
#redis ⇒ Object
Returns the value of attribute redis.
6 7 8 |
# File 'lib/speed_limiter/config.rb', line 6 def redis @redis end |
#redis_url ⇒ Object
Returns the value of attribute redis_url.
6 7 8 |
# File 'lib/speed_limiter/config.rb', line 6 def redis_url @redis_url end |