lib/chef/resource/machine_batch.rb in chef-provisioning-2.6.0 vs lib/chef/resource/machine_batch.rb in chef-provisioning-2.7.0

- old
+ new

@@ -48,10 +48,10 @@ # We override this because we want to hide @from_recipe and shorten @machines # in error output. def to_text ivars = instance_variables.map { |ivar| ivar.to_sym } - HIDDEN_IVARS - [ :@from_recipe, :@machines ] text = "# Declared in #{@source_line}\n\n" - text << self.class.dsl_name + "(\"#{name}\") do\n" + text << self.class.resource_name.to_s + "(\"#{name}\") do\n" ivars.each do |ivar| if (value = instance_variable_get(ivar)) && !(value.respond_to?(:empty?) && value.empty?) value_string = value.respond_to?(:to_text) ? value.to_text : value.inspect text << " #{ivar.to_s.sub(/^@/,'')} #{value_string}\n" end