Sha256: bad2e3e7f4521f4a7fded3abde4d3a4d9cc91ecc9722e99a89bdf55948565d16

Contents?: true

Size: 639 Bytes

Versions: 17

Compression:

Stored size: 639 Bytes

Contents

# -*- encoding: utf-8 -*-

module PMP
  class Response
    attr_accessor :raw, :request

    def initialize(raw, request)
      @raw     = raw
      @request = request

      # check_for_error(raw)
    end

    # def check_for_error(response)
    #   status_code_type = response.status.to_s[0]
    #   case status_code_type
    #   when "2"
    #     # puts "all is well, status: #{response.status}"
    #   when "4", "5"
    #     raise "Whoops, error back from PMP: #{response.status}"
    #   else
    #     raise "Unrecongized status code: #{response.status}"
    #   end
    # end

    def body
      self.raw.body
    end

  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
pmp-0.5.7 lib/pmp/response.rb
pmp-0.5.6 lib/pmp/response.rb
pmp-0.5.5 lib/pmp/response.rb
pmp-0.5.4 lib/pmp/response.rb
pmp-0.5.3 lib/pmp/response.rb
pmp-0.5.2 lib/pmp/response.rb
pmp-0.5.1 lib/pmp/response.rb
pmp-0.5.0 lib/pmp/response.rb
pmp-0.4.1 lib/pmp/response.rb
pmp-0.4.0 lib/pmp/response.rb
pmp-0.3.2 lib/pmp/response.rb
pmp-0.3.1 lib/pmp/response.rb
pmp-0.3.0 lib/pmp/response.rb
pmp-0.2.4 lib/pmp/response.rb
pmp-0.2.3 lib/pmp/response.rb
pmp-0.2.2 lib/pmp/response.rb
pmp-0.2.1 lib/pmp/response.rb