Class: FluentCommandBuilder::AppEnginePythonVersionDetector
- Inherits:
-
Object
- Object
- FluentCommandBuilder::AppEnginePythonVersionDetector
- Defined in:
- lib/fluent_command_builder/version_detectors/appengine_python_version_detector.rb
Instance Attribute Summary collapse
-
#path_finder ⇒ Object
Returns the value of attribute path_finder.
Instance Method Summary collapse
-
#initialize(command_name) ⇒ AppEnginePythonVersionDetector
constructor
A new instance of AppEnginePythonVersionDetector.
- #version(path = nil) ⇒ Object
Constructor Details
#initialize(command_name) ⇒ AppEnginePythonVersionDetector
Returns a new instance of AppEnginePythonVersionDetector.
9 10 11 12 |
# File 'lib/fluent_command_builder/version_detectors/appengine_python_version_detector.rb', line 9 def initialize(command_name) @command_name = command_name @path_finder = FluentCommandBuilder.path_finder end |
Instance Attribute Details
#path_finder ⇒ Object
Returns the value of attribute path_finder.
7 8 9 |
# File 'lib/fluent_command_builder/version_detectors/appengine_python_version_detector.rb', line 7 def path_finder @path_finder end |
Instance Method Details
#version(path = nil) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/fluent_command_builder/version_detectors/appengine_python_version_detector.rb', line 14 def version(path=nil) path ||= @path_finder.find_path @command_name return unless path && File.exist?(path) version_file = File.join path, 'VERSION' version_hash = YAML::load_file version_file version_hash['release'] end |