Sha256: f75538d5f2f6341493eba5dafb3cf04c4744ee4b642b00159c367e79442174fb

Contents?: true

Size: 495 Bytes

Versions: 4

Compression:

Stored size: 495 Bytes

Contents

# frozen_string_literal: true

module FancyCount
  class Adapter
    def initialize(name)
      @name = name
    end

    def increment
      counter.increment
    end

    def decrement
      counter.decrement
    end

    def change(value)
      counter.value = value
    end

    def reset
      counter.value = 0
    end

    def value
      counter.value
    end

    def delete
      counter.delete
    end

    private

    def counter
      raise "Not yet implemented"
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fancy_count-1.0.3 lib/fancy_count/adapter.rb
fancy_count-1.0.2 lib/fancy_count/adapter.rb
fancy_count-1.0.1 lib/fancy_count/adapter.rb
fancy_count-1.0.0 lib/fancy_count/adapter.rb