lib/billomat/search.rb in billomat-0.4.1 vs lib/billomat/search.rb in billomat-1.0.0

- old
+ new

@@ -22,10 +22,10 @@ # Runs the query and calls the gateway. # Currently it will always return an empty array when no query is provided. # # @return [Array<Billomat::Model::Base>] def run - return [] if @hash.reject { |_k, v| v.nil? }.empty? + return [] if @hash.compact.empty? to_array(Billomat::Gateway.new(:get, path).run) end # Corrects the response to always return an array.