Sha256: 4b39ecf097726affe4526cd15abb119d2110e94e5a96d9c2bafed6f64811ccf0
Contents?: true
Size: 569 Bytes
Versions: 4
Compression:
Stored size: 569 Bytes
Contents
# frozen_string_literal: true module FancyCount class Counter def initialize(name, config = nil) @name = name @config = config || ::FancyCount.config end def increment adapter.increment end def decrement adapter.decrement end def change(value) adapter.change(value) end def reset adapter.reset end def value adapter.value end def delete adapter.delete end private def adapter @adapter ||= @config.adapter_class.new(@name) end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
fancy_count-1.0.3 | lib/fancy_count/counter.rb |
fancy_count-1.0.2 | lib/fancy_count/counter.rb |
fancy_count-1.0.1 | lib/fancy_count/counter.rb |
fancy_count-1.0.0 | lib/fancy_count/counter.rb |