Method: RDI::ContextModifiers::SystemPath#transformContentWithInstallEnv

Defined in:
lib/rdi/Plugins/ContextModifiers/SystemPath.rb

#transformContentWithInstallEnv(iLocation, iInstallEnv) ⇒ Object

Transform a given content based on an installation environment. This is called to pass some specific installation parameters to a more generic content (useful for installation directories for example)

Parameters:

  • iLocation (Object): Location to transform

  • iInstallEnv (map<Symbol,Object>): The installation environment that called this context modification

Return:

  • Object: The location transformed with the installation environment



30
31
32
33
34
35
36
37
38
39
# File 'lib/rdi/Plugins/ContextModifiers/SystemPath.rb', line 30

def transformContentWithInstallEnv(iLocation, iInstallEnv)
  rNewLocation = iLocation

  lInstallDir = iInstallEnv[:InstallDir]
  if (lInstallDir != nil)
    rNewLocation = iLocation.gsub(/%INSTALLDIR%/, lInstallDir)
  end

  return rNewLocation
end