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



28
29
30
# File 'lib/pause/configuration.rb', line 28

def history
  (@history || 86_400).to_i
end

#redis_dbObject



20
21
22
# File 'lib/pause/configuration.rb', line 20

def redis_db
  @redis_db || '1'
end

#redis_hostObject



12
13
14
# File 'lib/pause/configuration.rb', line 12

def redis_host
  @redis_host || '127.0.0.1'
end

#redis_portObject



16
17
18
# File 'lib/pause/configuration.rb', line 16

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

#resolutionObject



24
25
26
# File 'lib/pause/configuration.rb', line 24

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

#shardedObject



32
33
34
# File 'lib/pause/configuration.rb', line 32

def sharded
  !!@sharded
end

Instance Method Details

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

Yields:

  • (_self)

Yield Parameters:



7
8
9
10
# File 'lib/pause/configuration.rb', line 7

def configure
  yield self if block_given?
  self
end