Module: FlickrMocks::CustomCompare
- Included in:
- FlickRaw::Response, FlickRaw::ResponseList
- Defined in:
- lib/flickr_mocks/flickraw/custom_compare.rb
Overview
module that contains methods that contain custom ‘==’ check. This module is used internally and is included in the FlickrMocks::Models.
Instance Method Summary collapse
-
#==(other) ⇒ Object
custom equality method that is added in various classes to override Ruby’s default ‘==’ behavior.
Instance Method Details
#==(other) ⇒ Object
custom equality method that is added in various classes to override Ruby’s default ‘==’ behavior
8 9 10 11 12 13 14 15 |
# File 'lib/flickr_mocks/flickraw/custom_compare.rb', line 8 def ==(other) return false if other.nil? return false unless other.is_a?(self.class) case other when FlickRaw::Response then compare_response(other) else self == other end end |