Sha256: 72618f0de0df985d98acdd4a772c85308b3627f304e6644421c1cf03e715ecf9

Contents?: true

Size: 399 Bytes

Versions: 8

Compression:

Stored size: 399 Bytes

Contents

require "reactor/cm/xml_request_error"

module Reactor
  module Cm
    class XmlSingleRequestError < XmlRequestError
      def initialize(response)
        @response = response
        super(phrase)
      end

      def phrase
        result = @response.xpath("//phrase/text()")
        result = [result] unless result.is_a?(Array)

        result.map(&:to_s).join("\n")
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
infopark_reactor-1.29.1 lib/reactor/cm/xml_single_request_error.rb
infopark_reactor-1.29.0 lib/reactor/cm/xml_single_request_error.rb
infopark_reactor-1.28.0 lib/reactor/cm/xml_single_request_error.rb
infopark_reactor-1.27.0.rc10 lib/reactor/cm/xml_single_request_error.rb
infopark_reactor-1.27.0.rc9 lib/reactor/cm/xml_single_request_error.rb
infopark_reactor-1.27.0.rc8 lib/reactor/cm/xml_single_request_error.rb
infopark_reactor-1.27.0.rc7 lib/reactor/cm/xml_single_request_error.rb
infopark_reactor-1.27.0.rc4 lib/reactor/cm/xml_single_request_error.rb