Class: Txgh::Handlers::Response

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Response.



6
7
8
9
10
# File 'lib/txgh/handlers/response.rb', line 6

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

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



4
5
6
# File 'lib/txgh/handlers/response.rb', line 4

def body
  @body
end

#errorObject (readonly)

Returns the value of attribute error.



4
5
6
# File 'lib/txgh/handlers/response.rb', line 4

def error
  @error
end

#statusObject (readonly)

Returns the value of attribute status.



4
5
6
# File 'lib/txgh/handlers/response.rb', line 4

def status
  @status
end

Instance Method Details

#streaming?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/txgh/handlers/response.rb', line 12

def streaming?
  false
end