module Spreedly::ErrorsParser
Public Instance Methods
errors_from(xml_doc)
click to toggle source
# File lib/spreedly/common/errors_parser.rb, line 4 def errors_from(xml_doc) xml_doc.xpath(".//errors/error").map do |each| { attribute: each.attributes['attribute'].to_s, key: each.attributes['key'].to_s, message: each.text } end end