Module: Grape::Formatter::Xml

Defined in:
lib/grape/formatter/xml.rb

Class Method Summary collapse

Class Method Details

.call(object, env) ⇒ Object



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

def call(object, env)
  object.respond_to?(:to_xml) ? object.to_xml : object.to_s
end