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
# File 'lib/ploy/packageset.rb', line 5

def initialize(conf)
  self.packages = []
  conf['packages'].each do |k,v|
    self.packages.push Ploy::Package.new(
      conf['bucket'] || v['bucket'],
      k,
      v['branch'],
      v['version']
    )
  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)


18
19
20
# File 'lib/ploy/packageset.rb', line 18

def locked?
  return @locked ? true : false
end