Sha256: 6d7210cdc79543f624c9cc222392ee349298fa0dfe6350165eec764ceafbab3f

Contents?: true

Size: 410 Bytes

Versions: 14

Compression:

Stored size: 410 Bytes

Contents

# encoding: utf-8

require 'faraday'

module Github
  class Response::Xmlize < Response

    dependency 'nokogiri'

    define_parser do |body|
      ::Nokogiri::XML body
    end

    def parse(body)
      case body
      when ''
        nil
      when 'true'
        true
      when 'false'
        false
      else
        self.class.parser.call(body)
      end
    end
  end # Response::Xmlize
end # Github

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
github_api-0.19.0 lib/github_api/response/xmlize.rb
lingfennan-github_api-0.18.2 lib/github_api/response/xmlize.rb
github_api-0.18.2 lib/github_api/response/xmlize.rb
github_api-0.18.1 lib/github_api/response/xmlize.rb
github_api-0.17.0 lib/github_api/response/xmlize.rb
github_api-0.16.0 lib/github_api/response/xmlize.rb
github_api-0.15.0 lib/github_api/response/xmlize.rb
github_api-0.14.5 lib/github_api/response/xmlize.rb
github_api-0.14.4 lib/github_api/response/xmlize.rb
github_api-0.14.3 lib/github_api/response/xmlize.rb
github_api-0.14.2 lib/github_api/response/xmlize.rb
github_api-0.14.1 lib/github_api/response/xmlize.rb
github_api-0.14.0 lib/github_api/response/xmlize.rb
github_api-0.13.1 lib/github_api/response/xmlize.rb