diff options
Diffstat (limited to 'lib/chef/mixin/properties.rb')
-rw-r--r-- | lib/chef/mixin/properties.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/chef/mixin/properties.rb b/lib/chef/mixin/properties.rb index af4e2c2c09..2e33d2d0e7 100644 --- a/lib/chef/mixin/properties.rb +++ b/lib/chef/mixin/properties.rb @@ -17,7 +17,7 @@ class Chef # # @return [Hash<Symbol,Property>] The list of property names and types. # - def properties(include_superclass=true) + def properties(include_superclass = true) if include_superclass result = {} ancestors.reverse_each { |c| result.merge!(c.properties(false)) if c.respond_to?(:properties) } @@ -92,10 +92,10 @@ class Chef # @example With type and options # property :x, String, default: 'hi' # - def property(name, type=NOT_PASSED, **options) + def property(name, type = NOT_PASSED, **options) name = name.to_sym - options.each { |k,v| options[k.to_sym] = v if k.is_a?(String) } + options.each { |k, v| options[k.to_sym] = v if k.is_a?(String) } options[:instance_variable_name] = :"@#{name}" if !options.has_key?(:instance_variable_name) options.merge!(name: name, declared_in: self) @@ -200,7 +200,7 @@ class Chef # If state_attrs *excludes* something which is currently desired state, # mark it as desired_state: false. - local_properties.each do |name,property| + local_properties.each do |name, property| if property.desired_state? && !names.include?(name) self.property name, desired_state: false end @@ -248,7 +248,7 @@ class Chef # If identity_properties *excludes* something which is currently part of # the identity, mark it as identity: false. - properties.each do |name,property| + properties.each do |name, property| if property.identity? && !names.include?(name) self.property name, identity: false |