class YAVM::Versions

Attributes

versions[RW]

Public Class Methods

new(versions) click to toggle source
# File lib/yavm/versions.rb, line 7
def initialize(versions)
  self.versions = versions.compact
end

Public Instance Methods

equal?() click to toggle source

Get a list of versions which aren't the same version as the first version, and boolean-ify that result

# File lib/yavm/versions.rb, line 22
def equal?
  versions.reject { |v| v == versions.first }.length.zero?
end
files() click to toggle source
# File lib/yavm/versions.rb, line 26
def files
  versions.map { |v| v.store.filename || nil }.compact
end
set_all!(authoritative_version) click to toggle source

Set a given version to be the authoritative version for all defined stores

# File lib/yavm/versions.rb, line 12
def set_all!(authoritative_version)
  versions.each do |version|
    version.store.set!(authoritative_version)
  end
end