Module: Mangdown::Equality
- Included in:
- Chapter, MDHash, Manga, Page, PopularManga
- Defined in:
- lib/mangdown/mangdown.rb
Instance Method Summary collapse
-
#<=>(other) ⇒ Object
space ship operator for sorting.
- #==(other) ⇒ Object
- #eql?(other) ⇒ Boolean
Instance Method Details
#<=>(other) ⇒ Object
space ship operator for sorting
15 16 17 |
# File 'lib/mangdown/mangdown.rb', line 15 def <=>(other) self.name <=> other.name end |
#==(other) ⇒ Object
9 10 11 12 |
# File 'lib/mangdown/mangdown.rb', line 9 def ==(other) # puts "You may want to use :eql?" super end |
#eql?(other) ⇒ Boolean
5 6 7 |
# File 'lib/mangdown/mangdown.rb', line 5 def eql?(other) (self.name == other.name) && (self.uri == other.uri) end |