diff --git a/lib/chef_zero/chef_data/cookbook_data.rb b/lib/chef_zero/chef_data/cookbook_data.rb index e690fde4..4fd03209 100644 --- a/lib/chef_zero/chef_data/cookbook_data.rb +++ b/lib/chef_zero/chef_data/cookbook_data.rb @@ -129,11 +129,15 @@ def cookbook_arg(key, cookbook, version_constraints) self[key][cookbook] = version_constraints.first || ">= 0.0.0" end - def method_missing(key, value = nil) - if value.nil? + def method_missing(key, *values) + if values.nil? self[key.to_sym] else - store key.to_sym, value + if values.length > 1 + store key.to_sym, values + else + store key.to_sym, values.first + end end end end