diff options
author | Chris Walters, Tim Hinderliter <cw@opscode.com,tim@opscode.com> | 2010-05-24 17:20:33 -0700 |
---|---|---|
committer | Daniel DeLeo <dan@opscode.com> | 2010-06-03 12:22:06 -0700 |
commit | 026fd663a2b1ea3d7f1c7dde138909bc05b0ecd2 (patch) | |
tree | 872aee84cab8cdf06893c6dc4aeeb97f46e83d18 /chef/lib/chef/cookbook | |
parent | 73a079c967468c0004ec38c04c78b8dc929ebd9a (diff) | |
download | chef-026fd663a2b1ea3d7f1c7dde138909bc05b0ecd2.tar.gz |
Making FileVendor factory setter sexier
Diffstat (limited to 'chef/lib/chef/cookbook')
-rw-r--r-- | chef/lib/chef/cookbook/file_vendor.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/chef/lib/chef/cookbook/file_vendor.rb b/chef/lib/chef/cookbook/file_vendor.rb index 3917190f36..33d58eaa64 100644 --- a/chef/lib/chef/cookbook/file_vendor.rb +++ b/chef/lib/chef/cookbook/file_vendor.rb @@ -23,14 +23,14 @@ class Chef class Cookbook class FileVendor - def self.instance_creator=(creator) - @instance_creator = creator + def self.on_create(&block) + @instance_creator = block end # Factory method that creates the appropriate kind of # Cookbook::FileVendor to serve the contents of the manifest def self.create_from_manifest(manifest) - raise "Must set Chef::Cookbook::FileVendor.instance_creator before calling create_from_manifest factory" unless defined?(@instance_creator) + raise "Must call Chef::Cookbook::FileVendor.on_create before calling create_from_manifest factory" unless defined?(@instance_creator) @instance_creator.call(manifest) end |