class Puppet::ResourceApi::MonkeyHash
this hash allows key-value based ordering comparisons between instances of this and instances of this and other classes this is required for ‘lib/puppet/indirector/resource/ral.rb`’s ‘search` method which expects all titles to be comparable
Public Instance Methods
<=>(other)
click to toggle source
# File lib/puppet/resource_api/glue.rb, line 71 def <=>(other) result = self.class.name <=> other.class.name if result.zero? result = keys.sort <=> other.keys.sort end if result.zero? result = keys.sort.map { |k| self[k] } <=> other.keys.sort.map { |k| other[k] } end result end