# File lib/puppet/type/zone.rb, line 16
16:         def configtext
17:             list = @should
18: 
19:             current_value = self.retrieve
20: 
21:             unless current_value.is_a? Symbol
22:                 if current_value.is_a? Array
23:                     list += current_value
24:                 else
25:                     if current_value
26:                         list << current_value
27:                     end
28:                 end
29:             end
30: 
31:             # Some hackery so we can test whether current_value is an array or a symbol
32:             if current_value.is_a? Array
33:                 tmpis = current_value
34:             else
35:                 if current_value
36:                     tmpis = [current_value]
37:                 else
38:                     tmpis = []
39:                 end
40:             end
41: 
42:             rms = []
43:             adds = []
44: 
45:             # Collect the modifications to make
46:             list.sort.uniq.collect do |obj|
47:                 # Skip objectories that are configured and should be
48:                 next if tmpis.include?(obj) and @should.include?(obj)
49: 
50:                 if tmpis.include?(obj)
51:                     rms << obj
52:                 else
53:                     adds << obj
54:                 end
55:             end
56: 
57: 
58:             # And then perform all of the removals before any of the adds.
59:             (rms.collect { |o| rm(o) } + adds.collect { |o| add(o) }).join("\n")
60:         end