Class: Wiki2Go::GreyList::Suspect
- Inherits:
-
Object
- Object
- Wiki2Go::GreyList::Suspect
- Includes:
- Comparable
- Defined in:
- lib/Wiki2Go/GreyList.rb
Instance Attribute Summary collapse
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
- #eql?(other) ⇒ Boolean
- #hash ⇒ Object
-
#initialize(user, url) ⇒ Suspect
constructor
A new instance of Suspect.
- #to_s ⇒ Object
Constructor Details
#initialize(user, url) ⇒ Suspect
Returns a new instance of Suspect.
12 13 14 15 |
# File 'lib/Wiki2Go/GreyList.rb', line 12 def initialize(user,url) @user = user @url = url end |
Instance Attribute Details
#url ⇒ Object (readonly)
Returns the value of attribute url.
9 10 11 |
# File 'lib/Wiki2Go/GreyList.rb', line 9 def url @url end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
10 11 12 |
# File 'lib/Wiki2Go/GreyList.rb', line 10 def user @user end |
Instance Method Details
#<=>(other) ⇒ Object
25 26 27 28 |
# File 'lib/Wiki2Go/GreyList.rb', line 25 def <=>(other) return false if other.nil? self.to_s <=> other.to_s end |
#eql?(other) ⇒ Boolean
30 31 32 33 |
# File 'lib/Wiki2Go/GreyList.rb', line 30 def eql?(other) return false if other.nil? self.to_s == other.to_s end |
#hash ⇒ Object
21 22 23 |
# File 'lib/Wiki2Go/GreyList.rb', line 21 def hash self.to_s.hash end |
#to_s ⇒ Object
17 18 19 |
# File 'lib/Wiki2Go/GreyList.rb', line 17 def to_s @user + ' ' + @url end |