Class: Ksql::Handlers::Collection
- Inherits:
-
Object
- Object
- Ksql::Handlers::Collection
- Defined in:
- lib/ksql/handlers/collection.rb
Class Method Summary collapse
-
.handle(response) ⇒ Ksql::Collection
Handle the response to generate an Enumerable collection.
Class Method Details
.handle(response) ⇒ Ksql::Collection
Handle the response to generate an Enumerable collection
13 14 15 16 17 18 19 |
# File 'lib/ksql/handlers/collection.rb', line 13 def self.handle(response) return Ksql::Error.new(response.body) if response.error? body_dup = response.body headers = body_dup.shift Ksql::Collection.new(headers, body_dup) end |