Class: TxghServer::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/txgh-server/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/txgh-server/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/txgh-server/response.rb', line 3

def body
  @body
end

#errorObject (readonly)

Returns the value of attribute error.



3
4
5
# File 'lib/txgh-server/response.rb', line 3

def error
  @error
end

#statusObject (readonly)

Returns the value of attribute status.



3
4
5
# File 'lib/txgh-server/response.rb', line 3

def status
  @status
end

Instance Method Details

#streaming?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/txgh-server/response.rb', line 11

def streaming?
  false
end