def matches?(attributes)
      attributes.all? do |name, value|
        if send(name).is_a?(Flickr::Object) and value.is_a?(Hash)
          send(name).matches?(value)
        else
          send(name) == value
        end
      end
    end
def matches?(attributes)
      attributes.all? do |name, value|
        if send(name).is_a?(Flickr::Object) and value.is_a?(Hash)
          send(name).matches?(value)
        else
          send(name) == value
        end
      end
    end
Tests if the object matches a hash of attributes. Supports nesting
 (see the example).

 @param attributes [Hash]
 @return [Boolean]
 @example
   photo.matches?(owner: {username: "janko"})