Sha256: c923b621300712104b73af13459e0c309094b45742ae95a5c3242fb9e9ae295e

Contents?: true

Size: 445 Bytes

Versions: 5

Compression:

Stored size: 445 Bytes

Contents

require 'peek/adapters/base'

module Peek
  module Adapters
    class Memory < Base
      attr_accessor :requests

      def initialize(options = {})
        @requests = {}
      end

      def get(request_id)
        @requests[request_id]
      end

      def save(request_id)
        return false if request_id.blank?

        @requests[request_id] = Peek.results
      end

      def reset
        @requests.clear
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/peek-1.1.0/lib/peek/adapters/memory.rb
zuora_connect_ui-0.9.2 vendor/ruby/2.6.0/gems/peek-1.1.0/lib/peek/adapters/memory.rb
zuora_connect_ui-0.9.1 vendor/ruby/2.6.0/gems/peek-1.1.0/lib/peek/adapters/memory.rb
zuora_connect_ui-0.9.0 vendor/ruby/2.6.0/gems/peek-1.1.0/lib/peek/adapters/memory.rb
peek-1.1.0 lib/peek/adapters/memory.rb