Sha256: 6d68b9023f70859323f5af081a70defc2044048d3bf209c11346f083f915c7f4

Contents?: true

Size: 436 Bytes

Versions: 49

Compression:

Stored size: 436 Bytes

Contents

require 'delegate'

module HTTParty
  # Allow access to http_response and code by delegation on fragment
  class ResponseFragment < SimpleDelegator
    attr_reader :http_response, :connection

    def code
      @http_response.code.to_i
    end

    def initialize(fragment, http_response, connection)
      @fragment = fragment
      @http_response = http_response
      @connection = connection
      super fragment
    end
  end
end

Version data entries

49 entries across 24 versions & 4 rubygems

Version Path
paynow_sdk-1.0.3 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/lib/httparty/response_fragment.rb
paynow_sdk-1.0.3 vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/lib/httparty/response_fragment.rb
paynow_sdk-1.0.2 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/lib/httparty/response_fragment.rb
paynow_sdk-1.0.2 vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/lib/httparty/response_fragment.rb
paynow_sdk-1.0.1 vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/lib/httparty/response_fragment.rb
paynow_sdk-1.0.1 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/lib/httparty/response_fragment.rb
paynow_sdk-1.0.0 vendor/cache/ruby/2.7.0/gems/paynow_sdk-1.0.0/vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/lib/httparty/response_fragment.rb
paynow_sdk-1.0.0 vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/lib/httparty/response_fragment.rb
paynow_sdk-0.2.0 vendor/cache/ruby/2.7.0/gems/paynow_sdk-0.1.8/vendor/cache/ruby/2.7.0/gems/paynow_sdk-0.1.8/vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/lib/httparty/response_fragment.rb
paynow_sdk-0.2.0 vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/lib/httparty/response_fragment.rb
paynow_sdk-0.2.0 vendor/cache/ruby/2.7.0/gems/paynow_sdk-0.1.8/vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/lib/httparty/response_fragment.rb
paynow_sdk-0.2.0 vendor/cache/ruby/2.7.0/gems/paynow_sdk-0.1.9/vendor/cache/ruby/2.7.0/gems/paynow_sdk-0.1.8/vendor/cache/ruby/2.7.0/gems/paynow_sdk-0.1.8/vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/lib/httparty/response_fragment.rb
paynow_sdk-0.2.0 vendor/cache/ruby/2.7.0/gems/paynow_sdk-0.1.9/vendor/cache/ruby/2.7.0/gems/paynow_sdk-0.1.8/vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/lib/httparty/response_fragment.rb
paynow_sdk-0.2.0 vendor/cache/ruby/2.7.0/gems/paynow_sdk-0.1.9/vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/lib/httparty/response_fragment.rb
paynow_sdk-0.1.9 vendor/cache/ruby/2.7.0/gems/paynow_sdk-0.1.8/vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/lib/httparty/response_fragment.rb
paynow_sdk-0.1.9 vendor/cache/ruby/2.7.0/gems/paynow_sdk-0.1.8/vendor/cache/ruby/2.7.0/gems/paynow_sdk-0.1.8/vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/lib/httparty/response_fragment.rb
paynow_sdk-0.1.9 vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/lib/httparty/response_fragment.rb
cli-nasa-0.1.1 vendor/bundle/ruby/2.7.0/gems/httparty-0.18.1/lib/httparty/response_fragment.rb
cli-nasa-0.1.0 vendor/bundle/ruby/2.7.0/gems/httparty-0.18.1/lib/httparty/response_fragment.rb
paynow_sdk-0.1.8 vendor/cache/ruby/2.7.0/gems/httparty-0.18.1/lib/httparty/response_fragment.rb