Class: Ploy::PackageSet

Inherits:
Object
  • Object
show all
Defined in:
lib/ploy/packageset.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(conf) ⇒ PackageSet

Returns a new instance of PackageSet.



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/ploy/packageset.rb', line 5

def initialize(conf)
  self.packages = []
  conf['packages'].each do |k,v|
    if (not v)
      v = {}
    end
    self.packages.push Ploy::Package.new(
      conf['bucket'] || v['bucket'],
      k,
      v['branch'] || conf['branch'],
      v['version'] || conf['version'],
      v['variant'] || conf['variant'] || nil,
      v['updatevia'] || conf['updatevia'] || nil
    )
  end
  @locked = conf['locked']
end

Instance Attribute Details

#packagesObject

Returns the value of attribute packages.



3
4
5
# File 'lib/ploy/packageset.rb', line 3

def packages
  @packages
end

Instance Method Details

#locked?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/ploy/packageset.rb', line 23

def locked?
  return @locked ? true : false
end