Class: Flexirest::PlainResponse

Inherits:
String
  • Object
show all
Defined in:
lib/flexirest/plain_response.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#_headersObject

Returns the value of attribute _headers.



4
5
6
# File 'lib/flexirest/plain_response.rb', line 4

def _headers
  @_headers
end

#_statusObject

Returns the value of attribute _status.



3
4
5
# File 'lib/flexirest/plain_response.rb', line 3

def _status
  @_status
end

Class Method Details

.from_response(response) ⇒ Object



6
7
8
9
10
11
# File 'lib/flexirest/plain_response.rb', line 6

def self.from_response(response)
  plain = self.new(response.body)
  plain._status = response.status
  plain._headers = response.response_headers
  plain
end