Sha256: 44e3be9a485f0f49c2eca6fa0e7c732e034faf332958bd3d5c91715ee8fa3b47
Contents?: true
Size: 514 Bytes
Versions: 13
Compression:
Stored size: 514 Bytes
Contents
module PipeRpc class Client::Request class Response def initialize(hub, body) @hub = hub @body = body end attr_reader :body def result? @body.has_key? :result end def error? @body.has_key? :error end def handle type = result? ? ResultResponse : ErrorResponse result = type.new(@hub.requests[@body[:id]], @body).to_result @hub.requests.inject_result_for(@body[:id], result) end end end end
Version data entries
13 entries across 13 versions & 1 rubygems