Class: Fitting::Records::Tested::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/fitting/records/tested/response.rb

Instance Method Summary collapse

Constructor Details

#initialize(env_response) ⇒ Response

Returns a new instance of Response.



7
8
9
# File 'lib/fitting/records/tested/response.rb', line 7

def initialize(env_response)
  @env_response = env_response
end

Instance Method Details

#bodyObject



15
16
17
# File 'lib/fitting/records/tested/response.rb', line 15

def body
  @body ||= @env_response.body
end

#statusObject



11
12
13
# File 'lib/fitting/records/tested/response.rb', line 11

def status
  @status ||= @env_response.status
end

#to_sphericalObject



19
20
21
22
23
24
# File 'lib/fitting/records/tested/response.rb', line 19

def to_spherical
  Fitting::Records::Spherical::Response.new(
    status: status,
    body: body
  )
end