Module: Abaci

Defined in:
lib/abaci.rb,
lib/abaci/store.rb,
lib/abaci/counter.rb,
lib/abaci/version.rb

Defined Under Namespace

Classes: Counter, Store

Constant Summary collapse

VERSION =
"0.1.0"

Class Method Summary collapse

Class Method Details

.[](key) ⇒ Object



9
10
11
# File 'lib/abaci.rb', line 9

def [](key)
  Counter[key]
end

.optionsObject



13
14
15
16
17
18
# File 'lib/abaci.rb', line 13

def options
  @options ||= {
    :redis => nil,
    :prefix => 'ab'
  }
end

.prefixObject



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

def prefix
  options[:prefix]
end

.storeObject



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

def store
  @store ||= Store.new(options)
end