You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: redis_spec.rb
    path of file: ./repos/services/spec/services/logger
    
    the code of the file until where you have to start completion: require 'spec_hel
    
  def logs_in_db
    redis.lrange(key, 0, -1).map do |json|
      data = JSON.load(json)
      data['time'] = Time.at(data['time'])
      data
    end
  end