Class: Ladder::Sources

Inherits:
Hash
  • Object
show all
Defined in:
lib/chef/ladder.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_file(filename) ⇒ Object



9
10
11
12
13
# File 'lib/chef/ladder.rb', line 9

def self.from_file(filename)
	config = Sources.new
	config.instance_eval(File.read(filename), filename)
	return config
end

Instance Method Details

#cookbook(name, options) ⇒ Object



15
16
17
# File 'lib/chef/ladder.rb', line 15

def cookbook(name, options)
	self[name] = Ladder::Cookbooks::Cookbook.create(name, options)
end