Module: PassengerRecipes::Version
- Defined in:
- lib/passenger-recipes/version.rb
Overview
:nodoc:
Constant Summary collapse
Class Method Summary collapse
-
.check(required, actual) ⇒ Object
A method for comparing versions of required modules.
Class Method Details
.check(required, actual) ⇒ Object
A method for comparing versions of required modules. It expects two arrays of integers as parameters, the first being the minimum version required, and the second being the actual version available. It returns true if the actual version is at least equal to the required version.
7 8 9 10 11 |
# File 'lib/passenger-recipes/version.rb', line 7 def self.check(required, actual) #:nodoc: required = required.map { |v| "%06d" % v }.join(".") actual = actual.map { |v| "%06d" % v }.join(".") return actual >= required end |