lib/active_groonga/result_set.rb in activegroonga-1.0.5 vs lib/active_groonga/result_set.rb in activegroonga-1.0.6

- old
+ new

@@ -155,9 +155,17 @@ next if object.nil? yield(object) end end + # Returns whether this result set has records or not. + # + # @return [Boolean] true if the result set has one + # or more records, false otherwise. + def empty? + records.empty? + end + private def instantiate(record) resolved_record = record @n_key_nested.times do return nil if resolved_record.nil?