Sha256: 96b5dc2cdefea99fc595b8fad70f3cf621cfd552b8764ea16f8a5494e7a3bcd9

Contents?: true

Size: 156 Bytes

Versions: 6

Compression:

Stored size: 156 Bytes

Contents

module Counter::Reset
  extend ActiveSupport::Concern

  included do
    def reset!
      with_lock do
        update! value: 0
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
counterwise-0.1.5 app/models/concerns/counter/reset.rb
counterwise-0.1.4 app/models/concerns/counter/reset.rb
counterwise-0.1.3 app/models/concerns/counter/reset.rb
counterwise-0.1.2 app/models/concerns/counter/reset.rb
counterwise-0.1.1 app/models/concerns/counter/reset.rb
counterwise-0.1.0 app/models/concerns/counter/reset.rb