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: documentor.rb
    path of file: ./repos/solargraph/lib/solargraph
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require 'bundler'
require 'json'
require 'open3'
require 'shellwords'
require 'yard'
require 'fileutils'

module Solargraph
  class Documentor
    RDOC_GEMS = %w[
      actioncable actionmailbox actionmailer actionpack actiontext actionview
      activejob activemodel activerecord activestorage activesupport r
    
    def self.specs_from_bundle directory
      Solargraph.with_clean_env do
        cmd = [
          'ruby', '-e',
          "require 'bundler'; require 'json'; Dir.chdir('#{directory}') { puts Bundler.definition.specs_for([:default]).map { |spec| [spec.name, spec.version] }.to_h.to_json }"
        ]
        o, e, s = Open3.capture3(*cmd)
        if s.success?
          o && !o.empty? ? JSON.parse(o.split("\n").last) : {}
        else
          Solargraph.logger.warn e
          raise BundleNotFoundError, "Failed to load gems from bundle at #{directory}"
        end
      end