Module: Abaci
- Defined in:
- lib/abaci.rb,
lib/abaci/store.rb,
lib/abaci/metric.rb,
lib/abaci/counter.rb,
lib/abaci/version.rb,
lib/abaci/date_range.rb
Defined Under Namespace
Classes: Counter, DateRange, Metric, Store
Constant Summary
collapse
- VERSION =
"0.2.0"
Class Method Summary
collapse
Class Method Details
.[](key) ⇒ Object
11
12
13
|
# File 'lib/abaci.rb', line 11
def [](key)
Counter[key]
end
|
.method_missing(method, *args) ⇒ Object
50
51
52
|
# File 'lib/abaci.rb', line 50
def method_missing(method, *args)
Counter.send(method, *args)
end
|
.metrics ⇒ Object
Gets all specific metrics stored, without date-specific keys
16
17
18
|
# File 'lib/abaci.rb', line 16
def metrics
Metric.all
end
|
.options ⇒ Object
20
21
22
23
24
25
|
# File 'lib/abaci.rb', line 20
def options
@options ||= {
:redis => nil,
:prefix => 'ab'
}
end
|
.prefix ⇒ Object
32
33
34
|
# File 'lib/abaci.rb', line 32
def prefix
options[:prefix]
end
|
.prefix=(value) ⇒ Object
27
28
29
30
|
# File 'lib/abaci.rb', line 27
def prefix=(value)
@store = nil
options[:prefix] = value
end
|
.redis=(value) ⇒ Object
36
37
38
39
|
# File 'lib/abaci.rb', line 36
def redis=(value)
@store = nil
options[:redis] = value
end
|
.store ⇒ Object
Also known as:
redis
41
42
43
|
# File 'lib/abaci.rb', line 41
def store
@store ||= Store.new(options)
end
|
.summary ⇒ Object
46
47
48
|
# File 'lib/abaci.rb', line 46
def summary
Counter.all
end
|