Class: Capistrano::VersionValidator

Inherits:
Object
  • Object
show all
Defined in:
lib/capistrano/version_validator.rb

Instance Method Summary collapse

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

#verifyObject



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