Module: Solargraph::ApiMap::BundlerMethods

Included in:
Solargraph::ApiMap
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:



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

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

.reset_require_from_bundlevoid

This method returns an undefined value.



22
23
24
# File 'lib/solargraph/api_map/bundler_methods.rb', line 22

def reset_require_from_bundle
  @require_from_bundle = nil
end