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: modules_presenter.rb
    path of file: ./repos/gitlabhq/app/presenters/terraform
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Terraform
  class ModulesPresenter < Gitlab::View::Presenter::Simple
    attr_accessor :packages, :system

    presents nil, as: :modules

    def initialize(packages, system)
      @packages = packages
      @system = system
    end

    def modules
      project_url = @packages.first&.project&.web_url
      versions = @p
    
    def modules
      project_url = @packages.first&.project&.web_url
      versions = @packages.map do |package|
        {
          'version' => package.version,
          'submodules' => [],
          'root' => {
            'dependencies' => [],
            'providers' => [
              {
                'name' => @system,
                'version' => ''
              }
            ]
          }
        }
      end

      [
        {
          'versions' => versions,
          'source' => project_url
        }.compact
      ]
    end