Class: Grape::Formatter::Xml
Class Method Summary collapse
Methods inherited from Base
Class Method Details
.call(object, _env) ⇒ Object
6 7 8 9 10 |
# File 'lib/grape/formatter/xml.rb', line 6 def self.call(object, _env) return object.to_xml if object.respond_to?(:to_xml) raise Grape::Exceptions::InvalidFormatter.new(object.class, 'xml') end |