Class: Capistrano::VersionValidator
- Inherits:
-
Object
- Object
- Capistrano::VersionValidator
- Defined in:
- lib/capistrano/version_validator.rb
Instance Method Summary collapse
-
#initialize(version) ⇒ VersionValidator
constructor
A new instance of VersionValidator.
- #verify ⇒ Object
Constructor Details
#initialize(version) ⇒ VersionValidator
Returns a new instance of VersionValidator.
3 4 5 |
# File 'lib/capistrano/version_validator.rb', line 3 def initialize(version) @version = version end |
Instance Method Details
#verify ⇒ Object
7 8 9 10 |
# File 'lib/capistrano/version_validator.rb', line 7 def verify return self if match? raise "Capfile locked at #{version}, but #{current_version} is loaded" end |