lib/guacamole/query.rb in guacamole-0.0.1 vs lib/guacamole/query.rb in guacamole-0.1.0

- old
+ new

@@ -66,7 +66,18 @@ # @return [self] def skip(skip) options[:skip] = skip self end + + # Is this {Query} equal to another {Query} + # + # Two {Query} objects are equal if their examples are equal + # + # @param [Query] other The query to compare to + def ==(other) + other.instance_of?(self.class) && + example == other.example + end + alias_method :eql?, :== end end