Sha256: 2d8484b737db953248df63633c82ef922913812854363a95a19dbdac39ed157d

Contents?: true

Size: 257 Bytes

Versions: 7

Compression:

Stored size: 257 Bytes

Contents

# frozen_string_literal: true

# Encapsulates an HTTP base response
class SophiaResponse
  attr_reader :body, :status_code

  def initialize(http_response)
    @status_code = http_response.code.to_i
    @body = JSON.parse(http_response.read_body)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
sophia_service-1.1.0 lib/sophia_service/sophia_response.rb
sophia_service-1.0.0 lib/sophia_service/sophia_response.rb
sophia_service-0.3.2 lib/sophia_service/sophia_response.rb
sophia_service-0.3.1 lib/sophia_service/sophia_response.rb
sophia_service-0.3.0 lib/sophia_service/sophia_response.rb
sophia_service-0.2.0 lib/sophia_service/sophia_response.rb
sophia_service-0.1.0 lib/sophia_service/sophia_response.rb