aboutsummaryrefslogtreecommitdiffstats
path: root/core/lib
diff options
context:
space:
mode:
authorToshiaki Asai <toshi.alternative@gmail.com>2016-07-05 20:38:52 +0900
committerToshiaki Asai <toshi.alternative@gmail.com>2016-07-05 20:38:52 +0900
commit0e5cb363cd875b642cf27f17cffdd35b15be7cc0 (patch)
treea47e24beedb49ba9c8f7e9acab9b265b57924c25 /core/lib
parent4027f42749cfecf5f2509d5159bac068b22aa501 (diff)
downloadmikutter-0e5cb363cd875b642cf27f17cffdd35b15be7cc0.tar.gz
Retrieverの比較にidを使わず、uriを利用する
Diffstat (limited to 'core/lib')
-rw-r--r--core/lib/retriever/model.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/core/lib/retriever/model.rb b/core/lib/retriever/model.rb
index 34a8e08d..294e2ff0 100644
--- a/core/lib/retriever/model.rb
+++ b/core/lib/retriever/model.rb
@@ -204,12 +204,10 @@ class Retriever::Model
id - other end end
def ==(other)
- if other.is_a?(Retriever)
- id == other.id
- elsif other.respond_to?(:[]) and other[:id]
- id == other[:id]
- else
- id == other end end
+ if other.is_a? Retriever::Model
+ self.class == other.class && uri == other.uri
+ end
+ end
def to_hash
@value.dup