Sha256: 2ba4ac816df3db288aa0da722073bb92925ac850094bd82854b1c210e3600401

Contents?: true

Size: 318 Bytes

Versions: 9

Compression:

Stored size: 318 Bytes

Contents

require 'nokogiri'

require 'achecker/check_result'

module AChecker

  class CheckResultBuilder

    def build(url, achecker_url, xml)
      xml_doc = Nokogiri::XML(xml)

      CheckResult.new(
        url,
        achecker_url,
        xml_doc.xpath("//summary/NumOfErrors")[0].text.to_i
      )
    end

  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
achecker-0.0.9 lib/achecker/check_result_builder.rb
achecker-0.0.8 lib/achecker/check_result_builder.rb
achecker-0.0.7 lib/achecker/check_result_builder.rb
achecker-0.0.6 lib/achecker/check_result_builder.rb
achecker-0.0.5 lib/achecker/check_result_builder.rb
achecker-0.0.4 lib/achecker/check_result_builder.rb
achecker-0.0.3 lib/achecker/check_result_builder.rb
achecker-0.0.2 lib/achecker/check_result_builder.rb
achecker-0.0.1 lib/achecker/check_result_builder.rb