134: def <=>(other)
135:
136: if r = compare(exact?, other.exact?)
137: return r
138: end
139:
140:
141: if r = compare(self.ip?, other.ip?)
142: return r
143: end
144:
145:
146: unless self.length == other.length
147:
148:
149: return other.length <=> self.length
150: end
151:
152:
153: if r = compare(self.deny?, other.deny?)
154: return r
155: end
156:
157:
158:
159: if ip?
160: return self.pattern.to_s <=> other.pattern.to_s
161: else
162: return self.pattern <=> other.pattern
163: end
164: end