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
26 27 28 |
# File 'lib/pause/configuration.rb', line 26 def history (@history || 86400).to_i end |
#redis_db ⇒ Object
18 19 20 |
# File 'lib/pause/configuration.rb', line 18 def redis_db @redis_db || '1' end |
#redis_host ⇒ Object
10 11 12 |
# File 'lib/pause/configuration.rb', line 10 def redis_host @redis_host || '127.0.0.1' end |
#redis_port ⇒ Object
14 15 16 |
# File 'lib/pause/configuration.rb', line 14 def redis_port (@redis_port || 6379).to_i end |
#resolution ⇒ Object
22 23 24 |
# File 'lib/pause/configuration.rb', line 22 def resolution (@resolution || 600).to_i end |
#sharded ⇒ Object
30 31 32 |
# File 'lib/pause/configuration.rb', line 30 def sharded !!@sharded end |
Instance Method Details
#configure {|_self| ... } ⇒ Object
5 6 7 8 |
# File 'lib/pause/configuration.rb', line 5 def configure yield self self end |