class GitCompound::Manifest

Manifest

Constants

FILENAMES

Attributes

components[RW]
maintainer[RW]
name[RW]
tasks[RW]

Public Class Methods

new(contents, parent = nil) click to toggle source
# File lib/git_compound/manifest.rb, line 11
def initialize(contents, parent = nil)
  @contents   = contents
  @parent     = parent
  @name       = ''
  @maintainer = []
  @components = {}
  @tasks      = {}
  DSL::ManifestDSL.new(self, contents) if contents
end

Public Instance Methods

==(other) click to toggle source
# File lib/git_compound/manifest.rb, line 27
def ==(other)
  return false unless other.instance_of? Manifest
  md5sum == other.md5sum
end
exists?() click to toggle source
# File lib/git_compound/manifest.rb, line 32
def exists?
  @contents ? true : false
end
md5sum() click to toggle source
# File lib/git_compound/manifest.rb, line 36
def md5sum
  Digest::MD5.hexdigest(@contents) if exists?
end
process(*workers) click to toggle source
# File lib/git_compound/manifest.rb, line 21
def process(*workers)
  workers.each { |worker| worker.visit_manifest(self) }
  components.each_value { |component| component.process(*workers) }
  tasks.each_value { |task| workers.each { |worker| worker.visit_task(task) } }
end