Class: Txdb::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/txdb/response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status, body, error = nil) ⇒ Response

Returns a new instance of Response.



5
6
7
8
9
# File 'lib/txdb/response.rb', line 5

def initialize(status, body, error = nil)
  @status = status
  @body = body
  @error = error
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



3
4
5
# File 'lib/txdb/response.rb', line 3

def body
  @body
end

#errorObject (readonly)

Returns the value of attribute error.



3
4
5
# File 'lib/txdb/response.rb', line 3

def error
  @error
end

#statusObject (readonly)

Returns the value of attribute status.



3
4
5
# File 'lib/txdb/response.rb', line 3

def status
  @status
end