Module: Pelican

Extended by:
Pelican
Included in:
Pelican
Defined in:
lib/pelican.rb,
lib/pelican/event.rb,
lib/pelican/config.rb,
lib/pelican/version.rb

Defined Under Namespace

Modules: Event

Constant Summary collapse

VERSION =
'0.0.1'

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#keyObject

Returns the value of attribute key.



3
4
5
# File 'lib/pelican/config.rb', line 3

def key
  @key
end

#redisObject

Returns the value of attribute redis.



3
4
5
# File 'lib/pelican/config.rb', line 3

def redis
  @redis
end

Instance Method Details

#default_keyObject



10
11
12
# File 'lib/pelican/config.rb', line 10

def default_key
  'pelican:state'
end

#setup(key = nil, opts = {}) ⇒ Object



5
6
7
8
# File 'lib/pelican/config.rb', line 5

def setup(key = nil, opts = {})
  @key = key || default_key
  @redis = Redis.new(opts)
end