Sha256: d58258398d5337006b7f4918f29c70fdf1faea54ac8f496264f4404c86e3a94d

Contents?: true

Size: 406 Bytes

Versions: 20

Compression:

Stored size: 406 Bytes

Contents

# encoding: utf-8

require 'faraday'

module Nimbu
  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 # Nimbu

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
nimbu-api-0.5.0 lib/nimbu-api/response/xmlize.rb
nimbu-api-0.4.4 lib/nimbu-api/response/xmlize.rb
nimbu-api-0.4.3 lib/nimbu-api/response/xmlize.rb
nimbu-api-0.4.2 lib/nimbu-api/response/xmlize.rb
nimbu-api-0.4.1 lib/nimbu-api/response/xmlize.rb
nimbu-api-0.4.0 lib/nimbu-api/response/xmlize.rb
nimbu-api-0.3.0 lib/nimbu-api/response/xmlize.rb
nimbu-api-0.2.1 lib/nimbu-api/response/xmlize.rb
nimbu-api-0.2 lib/nimbu-api/response/xmlize.rb
nimbu-api-0.2.beta.3 lib/nimbu-api/response/xmlize.rb
nimbu-api-0.2.beta.2 lib/nimbu-api/response/xmlize.rb
nimbu-api-0.2.beta.1 lib/nimbu-api/response/xmlize.rb
nimbu-api-0.2.beta lib/nimbu-api/response/xmlize.rb
nimbu-api-0.1.5 lib/nimbu-api/response/xmlize.rb
nimbu-api-0.1.4 lib/nimbu-api/response/xmlize.rb
nimbu-api-0.1.3 lib/nimbu-api/response/xmlize.rb
nimbu-api-0.1.1 lib/nimbu-api/response/xmlize.rb
nimbu-api-0.1 lib/nimbu-api/response/xmlize.rb
nimbu-api-0.0.2 lib/nimbu-api/response/xmlize.rb
nimbu-api-0.0.1 lib/nimbu-api/response/xmlize.rb