210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
|
# File 'lib/content_data/content_data.rb', line 210
def ==(other)
return false if other.nil?
return false if @contents_info.size != other.contents_size
other.each_instance { |checksum, size, content_mod_time, instance_mod_time, server, path|
local_content_info = @contents_info[checksum]
return false if local_content_info.nil?
return false if local_content_info[0] != size
return false if local_content_info[2] != content_mod_time
local_instances = local_content_info[1]
return false if other.instances_size(checksum) != local_instances.size
location = [server, path]
local_instance_mod_time = local_instances[location]
return false if local_instance_mod_time.nil?
return false if local_instance_mod_time != instance_mod_time
}
true
end
|