Class: Puppet::Util::Autoload

Inherits:
Object
  • Object
show all
Defined in:
lib/puppet-languageserver-sidecar/puppet_modulepath_monkey_patches.rb

Class Method Summary collapse

Class Method Details

.module_directories(env) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/puppet-languageserver-sidecar/puppet_modulepath_monkey_patches.rb', line 10

def module_directories(env)
  result = original_module_directories(env)
  return result unless PuppetLanguageServerSidecar::Workspace.has_module_metadata?

  workspace_lib = File.join(PuppetLanguageServerSidecar::Workspace.root_path, 'lib')
  return result unless FileTest.directory?(workspace_lib)

  result << workspace_lib

  result
end

.original_module_directoriesObject



9
# File 'lib/puppet-languageserver-sidecar/puppet_modulepath_monkey_patches.rb', line 9

alias original_module_directories module_directories