Module: Solargraph::ApiMap::BundlerMethods

Included in:
YardMap
Defined in:
lib/solargraph/api_map/bundler_methods.rb

Class Method Summary collapse

Class Method Details

.require_from_bundle(directory) ⇒ Hash

Parameters:

  • directory (String)

Returns:

  • (Hash)


11
12
13
14
15
16
17
18
19
# File 'lib/solargraph/api_map/bundler_methods.rb', line 11

def require_from_bundle directory
  begin
    Solargraph.logger.info "Loading gems for bundler/require"
    Documentor.specs_from_bundle(directory)
  rescue BundleNotFoundError => e
    Solargraph.logger.warn e.message
    {}
  end
end