diff options
Diffstat (limited to 'lib/chef/resource/registry_key.rb')
-rw-r--r-- | lib/chef/resource/registry_key.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/chef/resource/registry_key.rb b/lib/chef/resource/registry_key.rb index eaa9a00de5..135e63d959 100644 --- a/lib/chef/resource/registry_key.rb +++ b/lib/chef/resource/registry_key.rb @@ -59,7 +59,7 @@ class Chef # See lib/chef/resource_reporter.rb for more information. attr_reader :unscrubbed_values - def initialize(name, run_context=nil) + def initialize(name, run_context = nil) super @architecture = :machine @recursive = false @@ -67,7 +67,7 @@ class Chef @values, @unscrubbed_values = [], [] end - def key(arg=nil) + def key(arg = nil) set_or_return( :key, arg, @@ -75,7 +75,7 @@ class Chef ) end - def values(arg=nil) + def values(arg = nil) if not arg.nil? if arg.is_a?(Hash) @values = [ arg ] @@ -90,7 +90,7 @@ class Chef raise ArgumentError, "Missing type key in RegistryKey values hash" unless v.has_key?(:type) raise ArgumentError, "Missing data key in RegistryKey values hash" unless v.has_key?(:data) v.each_key do |key| - raise ArgumentError, "Bad key #{key} in RegistryKey values hash" unless [:name,:type,:data].include?(key) + raise ArgumentError, "Bad key #{key} in RegistryKey values hash" unless [:name, :type, :data].include?(key) end raise ArgumentError, "Type of name => #{v[:name]} should be string" unless v[:name].is_a?(String) raise ArgumentError, "Type of type => #{v[:type]} should be symbol" unless v[:type].is_a?(Symbol) @@ -101,7 +101,7 @@ class Chef end end - def recursive(arg=nil) + def recursive(arg = nil) set_or_return( :recursive, arg, @@ -109,7 +109,7 @@ class Chef ) end - def architecture(arg=nil) + def architecture(arg = nil) set_or_return( :architecture, arg, |