Sha256: 0c69dfab39194aa4551dc7ec533de6d8f42602c4e1ada6129e2d7b0f4e692ad4

Contents?: true

Size: 724 Bytes

Versions: 9

Compression:

Stored size: 724 Bytes

Contents

# encoding: UTF-8
module Bin
  class Compatibility < ActiveSupport::Cache::Store
    def increment(key, amount=1)
      yield
    end

    def decrement(key, amount=1)
      yield
    end
  end

  if ActiveSupport::VERSION::STRING < '3'
    class Compatibility
      def write(key, value, options=nil, &block)
        super(key, value, options)
        yield
      end

      def read(key, options=nil, &block)
        super
        yield
      end

      def delete(key, options=nil, &block)
        super
        yield
      end

      def delete_matched(matcher, options=nil, &block)
        super
        yield
      end

      def exist?(key, options=nil, &block)
        super
        yield
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
honkster-bin-0.6.3.3 lib/bin/compatibility.rb
honkster-bin-0.6.3.2 lib/bin/compatibility.rb
honkster-bin-0.6.3.1 lib/bin/compatibility.rb
honkster-bin-0.6.3 lib/bin/compatibility.rb
bin-0.6.3 lib/bin/compatibility.rb
bin-0.6.2 lib/bin/compatibility.rb
bin-0.6.1 lib/bin/compatibility.rb
bin-0.6 lib/bin/compatibility.rb
bin-0.5 lib/bin/compatibility.rb