lib/comcetera.rb in comcetera-0.3.1 vs lib/comcetera.rb in comcetera-1.0.0
- old
+ new
@@ -56,9 +56,16 @@
end
rescue Timeout::Error, SystemCallError => e
# ignore
end
end
- nil
+ new(:error_message=>"Timeout from Comcetera", :debug=>"#{self.retries} times no response within #{self.timeout} seconds")
end
+ end
+
+ def ==(other)
+ [:operator_code, :msisdn, :error_code, :error_message, :debug].each do |attribute|
+ return false unless self.send(attribute) == other.send(attribute)
+ end
+ true
end
end