Class: Twirp::ClientResp

Inherits:
Object
  • Object
show all
Defined in:
lib/twirp/client_resp.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data: nil, body: nil, error: nil, headers: nil) ⇒ ClientResp

Returns a new instance of ClientResp.



21
22
23
24
25
26
# File 'lib/twirp/client_resp.rb', line 21

def initialize(data: nil, body: nil, error: nil, headers: nil)
  @data = data
  @error = error
  @body = body
  @headers = headers
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



17
18
19
# File 'lib/twirp/client_resp.rb', line 17

def body
  @body
end

#dataObject

Returns the value of attribute data.



16
17
18
# File 'lib/twirp/client_resp.rb', line 16

def data
  @data
end

#errorObject

Returns the value of attribute error.



18
19
20
# File 'lib/twirp/client_resp.rb', line 18

def error
  @error
end

#headersObject

Returns the value of attribute headers.



19
20
21
# File 'lib/twirp/client_resp.rb', line 19

def headers
  @headers
end