Class: Bosh::Director::Models::ReleaseVersion

Inherits:
Object
  • Object
show all
Defined in:
lib/bosh/director/models/release_version.rb

Instance Method Summary collapse

Instance Method Details

#package_by_name(package_name) ⇒ Object



14
15
16
17
18
# File 'lib/bosh/director/models/release_version.rb', line 14

def package_by_name(package_name)
  packages_by_name.fetch(package_name) do
    raise "Package name '#{package_name}' not found in release '#{release.name}/#{version}'"
  end
end

#validateObject



8
9
10
11
12
# File 'lib/bosh/director/models/release_version.rb', line 8

def validate
  validates_format VALID_ID, :version
  validates_presence [:release_id, :version]
  validates_unique [:release_id, :version]
end