debian-mirror-gitlab/gitlab-peek/lib/peek/adapters/memory.rb
2019-12-06 12:11:25 +05:30

25 lines
402 B
Ruby

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)
@requests[request_id] = Peek.results
end
def reset
@requests.clear
end
end
end
end