Class: Grape::ErrorFormatter::Xml

Inherits:
Base
  • Object
show all
Defined in:
lib/grape/error_formatter/xml.rb

Class Method Summary collapse

Methods inherited from Base

call, inherited, present, wrap_message

Class Method Details

.format_structured_message(structured_message) ⇒ Object



6
7
8
# File 'lib/grape/error_formatter/xml.rb', line 6

def self.format_structured_message(structured_message)
  structured_message.respond_to?(:to_xml) ? structured_message.to_xml(root: :error) : structured_message.to_s
end