Commit eb760018 authored by Fabio Pelosin's avatar Fabio Pelosin

[Presenter::CocoaPod] Added eql? and hash methods

parent 965773f2
...@@ -2,6 +2,8 @@ module Pod ...@@ -2,6 +2,8 @@ module Pod
class Command class Command
class Presenter class Presenter
class CocoaPod class CocoaPod
attr_accessor :set
def initialize(set) def initialize(set)
@set = set @set = set
end end
...@@ -70,6 +72,18 @@ module Pod ...@@ -70,6 +72,18 @@ module Pod
Pod::Specification::Statistics.instance.github_forks(@set) Pod::Specification::Statistics.instance.github_forks(@set)
end end
def ==(other)
self.class === other && @set == other.set
end
def eql?(other)
self.class === other && name.eql?(other.name)
end
def hash
name.hash
end
private private
def oxfordify words def oxfordify words
if words.size < 3 if words.size < 3
...@@ -82,3 +96,4 @@ module Pod ...@@ -82,3 +96,4 @@ module Pod
end end
end end
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment