Class: Pause::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/pause/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#historyObject



26
27
28
# File 'lib/pause/configuration.rb', line 26

def history
  (@history || 86400).to_i
end

#redis_dbObject



18
19
20
# File 'lib/pause/configuration.rb', line 18

def redis_db
  @redis_db || '1'
end

#redis_hostObject



10
11
12
# File 'lib/pause/configuration.rb', line 10

def redis_host
  @redis_host || '127.0.0.1'
end

#redis_portObject



14
15
16
# File 'lib/pause/configuration.rb', line 14

def redis_port
  (@redis_port || 6379).to_i
end

#resolutionObject



22
23
24
# File 'lib/pause/configuration.rb', line 22

def resolution
  (@resolution || 600).to_i
end

#shardedObject



30
31
32
# File 'lib/pause/configuration.rb', line 30

def sharded
  !!@sharded
end

Instance Method Details

#configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:



5
6
7
8
# File 'lib/pause/configuration.rb', line 5

def configure
  yield self
  self
end