Class: Pause::Configuration
- Inherits:
-
Object
- Object
- Pause::Configuration
- Defined in:
- lib/pause/configuration.rb
Instance Attribute Summary collapse
- #history ⇒ Object
- #redis_db ⇒ Object
- #redis_host ⇒ Object
- #redis_port ⇒ Object
- #resolution ⇒ Object
- #sharded ⇒ Object
Instance Method Summary collapse
Instance Attribute Details
#history ⇒ Object
28 29 30 |
# File 'lib/pause/configuration.rb', line 28 def history (@history || 86_400).to_i end |
#redis_db ⇒ Object
20 21 22 |
# File 'lib/pause/configuration.rb', line 20 def redis_db @redis_db || '1' end |
#redis_host ⇒ Object
12 13 14 |
# File 'lib/pause/configuration.rb', line 12 def redis_host @redis_host || '127.0.0.1' end |
#redis_port ⇒ Object
16 17 18 |
# File 'lib/pause/configuration.rb', line 16 def redis_port (@redis_port || 6379).to_i end |
#resolution ⇒ Object
24 25 26 |
# File 'lib/pause/configuration.rb', line 24 def resolution (@resolution || 600).to_i end |
#sharded ⇒ Object
32 33 34 |
# File 'lib/pause/configuration.rb', line 32 def sharded !!@sharded end |
Instance Method Details
#configure {|_self| ... } ⇒ Object
7 8 9 10 |
# File 'lib/pause/configuration.rb', line 7 def configure yield self if block_given? self end |