# File lib/puppet/property.rb, line 198
198:     def insync?(is)
199:         #debug "%s value is '%s', should be '%s'" %
200:         #    [self,self.is.inspect,self.should.inspect]
201:         unless defined? @should and @should
202:             return true
203:         end
204: 
205:         unless @should.is_a?(Array)
206:             self.devfail "%s's should is not array" % self.class.name
207:         end
208: 
209:         # an empty array is analogous to no should values
210:         if @should.empty?
211:             return true
212:         end
213: 
214:         # Look for a matching value
215:         if match_all?
216:             return (is == @should or is == @should.collect { |v| v.to_s })
217:         else
218:             @should.each { |val|
219:                 if is == val or is == val.to_s
220:                     return true
221:                 end
222:             }
223:         end
224: 
225:         # otherwise, return false
226:         return false
227:     end