Module: Grape::Formatter::Xml
- Defined in:
- lib/grape/formatter/xml.rb
Class Method Summary (collapse)
Class Method Details
+ (Object) call(object, env)
6 7 8 9 |
# File 'lib/grape/formatter/xml.rb', line 6 def call(object, env) return object.to_xml if object.respond_to?(:to_xml) raise Grape::Exceptions::InvalidFormatter.new(object.class, 'xml') end |