Sha256: bb616865877211c5bd340c1bd30f27f189a1b0c7b005c33737a711604b8bcc75

Contents?: true

Size: 274 Bytes

Versions: 14

Compression:

Stored size: 274 Bytes

Contents

class MockCache
  def initialize
    @storage = {}
  end

  def read(key)
    @storage[key]
  end

  def write(key, value)
    @storage[key] = value
  end

  def fetch(key, &block)
    @storage[key] ||= block.call
  end

  def delete(key)
    @storage.delete(key)
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
restforce-2.5.4 spec/support/mock_cache.rb
restforce-2.5.3 spec/support/mock_cache.rb
restforce-2.5.2 spec/support/mock_cache.rb
restforce-2.5.1 spec/support/mock_cache.rb
logstash-input-salesforce-3.0.0 vendor/jruby/1.9/gems/restforce-2.4.2/spec/support/mock_cache.rb
restforce-2.5.0 spec/support/mock_cache.rb
restforce-2.4.2 spec/support/mock_cache.rb
restforce-2.4.1 spec/support/mock_cache.rb
restforce-2.4.0 spec/support/mock_cache.rb
restforce-2.3.0 spec/support/mock_cache.rb
restforce-2.2.1 spec/support/mock_cache.rb
restforce-2.2.0 spec/support/mock_cache.rb
restforce-2.1.3 spec/support/mock_cache.rb
restforce-2.1.2 spec/support/mock_cache.rb