Class: JavaBuildpackUtils::Jre::Detect
- Inherits:
-
Object
- Object
- JavaBuildpackUtils::Jre::Detect
- Defined in:
- lib/java-buildpack-utils/jre/detect.rb
Overview
A class containing the functionality required to determine if an application is a Java application based on the its explicit JRE configuration
Instance Method Summary collapse
-
#initialize(app_dir) ⇒ Detect
constructor
Creates a new instance, passing in the application directory used during detection.
-
#run ⇒ String
The execution entry point for detection.
Constructor Details
#initialize(app_dir) ⇒ Detect
Creates a new instance, passing in the application directory used during detection
23 24 25 |
# File 'lib/java-buildpack-utils/jre/detect.rb', line 23 def initialize(app_dir) @selected_jre = JavaBuildpackUtils::Jre::SelectedJre.new(app_dir) end |
Instance Method Details
#run ⇒ String
The execution entry point for detection. This method is responsible for identifying exactly which version of Java should be used and returning a string that represents it.
32 33 34 |
# File 'lib/java-buildpack-utils/jre/detect.rb', line 32 def run @selected_jre.id end |