Sha256: 069d73df7b145669a8a00f4043042bf1e923ba2612103751c1e2944ab37fa96c

Contents?: true

Size: 296 Bytes

Versions: 10

Compression:

Stored size: 296 Bytes

Contents

module WeiBackend
  module Utils
    def self.parse_params(request_body)
      doc = Nokogiri::XML::Document.parse request_body
      result = {}
      doc.at_css('xml').element_children.each do |child|
        result[child.name.to_sym] = child.child.text
      end
      result
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
wei-backend-0.1.4 lib/wei-backend/utils.rb
wei-backend-0.1.2 lib/wei-backend/utils.rb
wei-backend-0.1.1 lib/wei-backend/utils.rb
wei-backend-0.1.0 lib/wei-backend/utils.rb
wei-backend-0.0.6 lib/wei-backend/utils.rb
wei-backend-0.0.5 lib/wei-backend/utils.rb
wei-backend-0.0.4 lib/wei-backend/utils.rb
wei-backend-0.0.3 lib/wei-backend/utils.rb
wei-backend-0.0.2 lib/wei-backend/utils.rb
wei-backend-0.0.1 lib/wei-backend/utils.rb