Sha256: 44a0d39d586dbfc7f8b45878d7cd280c4a6b6cbb09d34695ecaad169eca35859

Contents?: true

Size: 634 Bytes

Versions: 1

Compression:

Stored size: 634 Bytes

Contents

# frozen_string_literal: true

module Html2rss
  class RequestService
    ##
    # To be used by strategies to provide their response.
    class Response
      ##
      # @param body [String] the body of the response
      # @param headers [Hash] the headers of the response
      def initialize(body:, headers: {})
        @body = body

        headers = headers.dup
        headers.transform_keys!(&:to_s)

        @headers = headers
      end

      # @return [String] the body of the response
      attr_reader :body

      # @return [Hash<String, Object>] the headers of the response
      attr_reader :headers
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
html2rss-0.16.0 lib/html2rss/request_service/response.rb