Class: Analysand::BulkResponse

Inherits:
Response
  • Object
show all
Defined in:
lib/analysand/bulk_response.rb

Overview

A subclass of Response that adjusts success? to check for individual error records.

Instance Attribute Summary

Attributes inherited from Response

#body, #response

Instance Method Summary collapse

Methods inherited from Response

#initialize

Methods included from StatusCodePredicates

#code, #conflict?, #not_found?, #unauthorized?

Methods included from ResponseHeaders

#cookies, #etag, #session_cookie

Constructor Details

This class inherits a constructor from Analysand::Response

Instance Method Details

#success?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/analysand/bulk_response.rb', line 8

def success?
  super && body.none? { |r| r.has_key?('error') }
end