Class: VersionBoss::Gem::VersionFileFactory
- Inherits:
-
Object
- Object
- VersionBoss::Gem::VersionFileFactory
- Defined in:
- lib/version_boss/gem/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.
[ VersionBoss::Gem::VersionFileSources::Version, VersionBoss::Gem::VersionFileSources::VersionRb, VersionBoss::Gem::VersionFileSources::Gemspec ].freeze
Class Method Summary collapse
-
.find ⇒ VersionBoss::VersionFile?
Finds the version file for the gem.
Class Method Details
.find ⇒ VersionBoss::VersionFile?
Finds the version file for the gem
31 32 33 34 35 36 37 |
# File 'lib/version_boss/gem/version_file_factory.rb', line 31 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 |