Class: Semverify::VersionFileFactory
- Inherits:
-
Object
- Object
- Semverify::VersionFileFactory
- Defined in:
- lib/semverify/version_file_factory.rb
Overview
Finds the file that contains the gem's version and returns a VersionFile instance
Constant Summary collapse
- VERSION_FILE_SOURCES =
The list of VersionFileSources to check for the version file
The order of the list is important. The first VersionFileSource that finds a version file will be used.
[ Semverify::VersionFileSources::Version, Semverify::VersionFileSources::VersionRb, Semverify::VersionFileSources::Gemspec ].freeze
Class Method Summary collapse
-
.find ⇒ Semverify::VersionFile?
Finds the version file for the gem.
Class Method Details
permalink .find ⇒ Semverify::VersionFile?
Finds the version file for the gem
30 31 32 33 34 35 36 |
# File 'lib/semverify/version_file_factory.rb', line 30 def self.find VERSION_FILE_SOURCES.each do |version_file_source| version_file = version_file_source.find return version_file if version_file end nil end |