class Batali::Manifest

Collection of resolved units

Public Class Methods

build(path) click to toggle source

Build manifest from given path. If no file exists, empty manifest will be provided.

@param path [String] path to manifest @return [Manifest]

# File lib/batali/manifest.rb, line 17
def self.build(path)
  path = Utility.join_path(path)
  if File.exist?(path)
    new(Bogo::Config.new(path).data.merge(:path => path))
  else
    new(:path => path)
  end
end

Public Instance Methods

include?(unit) click to toggle source

Check for unit within manifest

@param unit [Unit] @return [TrueClass, FalseClass]

# File lib/batali/manifest.rb, line 30
def include?(unit)
  memoize(unit.inspect) do
    if cookbook
      !!cookbook.detect do |ckbk|
        ckbk.name == unit.name &&
          ckbk.version == unit.version
      end
    else
      false
    end
  end
end