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: automated_cleanup.rb
    path of file: ./repos/gitlabhq/scripts/review_apps
    
    the code of the file until where you have to start completion: #!/usr/bin/env ruby

# frozen_
    
    def threshold_time(days:)
      days_integer = days.to_i

      raise "days should be an integer between 1 and 365 inclusive! Got #{days_integer}" unless days_integer.between?(1, 365)

      Time.now - days_integer * 24 * 3600
    end