class Puppet::Property::OrderedList

This subclass of {Puppet::Property} manages an ordered list of values. The maintained order is the order defined by the 'current' set of values (i.e. the original order is not disrupted). Any additions are added after the current values in their given order).

For an unordered list see {Puppet::Property::List}.

Public Instance Methods

add_should_with_current(should, current) click to toggle source
   # File lib/puppet/property/ordered_list.rb
14 def add_should_with_current(should, current)
15   if current.is_a?(Array)
16     #tricky trick
17     #Preserve all the current items in the list
18     #but move them to the back of the line
19     should = should + (current - should)
20   end
21   should
22 end
dearrayify(array) click to toggle source
   # File lib/puppet/property/ordered_list.rb
24 def dearrayify(array)
25   array.join(delimiter)
26 end