Sha256: 51e780a07a0d6ca10179927f5102f54efd55c6952ba4a09f44bf2bdaaa40b706

Contents?: true

Size: 318 Bytes

Versions: 2

Compression:

Stored size: 318 Bytes

Contents

require 'json'

module Thanos
  module API
    class Response
      attr_reader :code, :status, :data

      def initialize(raw_response)
        response = JSON.parse(raw_response)
        @code = response['code'].to_i
        @status = response['status']
        @data = response['data']
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
thanos-0.6.0 lib/thanos/api/response.rb
thanos-0.5.0 lib/thanos/api/response.rb