lib/ecoportal/api/common/batch_response.rb in ecoportal-api-0.3.4 vs lib/ecoportal/api/common/batch_response.rb in ecoportal-api-0.3.5

- old
+ new

@@ -2,15 +2,15 @@ module API module Common class BatchResponse attr_reader :status, :body, :result def initialize(status, body, result = nil) - @status = status + @status = HTTP::Response::Status.new(status) @body = body @result = result end def success? - (0..299).include?(status) + status.success? end def each [*@result].each do |doc| yield doc end