class Easy::Resources::Redmine::Errors

Public Instance Methods

from_xml(xml, save_cache = false) click to toggle source

Redmine in XML responses specify type=“array” on Errors It cause that `Hash.from_xml` already parsed errors as a Array

# File lib/easy/resources/redmine/errors.rb, line 8
def from_xml(xml, save_cache = false)
  array = begin
    Array.wrap(Hash.from_xml(xml)["errors"])
  rescue StandardError
    []
  end
  from_array array, save_cache
end