Sha256: 1bbe64e6e8b455dcbd24d3f6f0b8ab5de358a3fe4458b20724c60f3197c9dace

Contents?: true

Size: 275 Bytes

Versions: 3

Compression:

Stored size: 275 Bytes

Contents

module Grape
  module Formatter
    module Xml
      class << self
        def call(object, env)
          return object.to_xml if object.respond_to?(:to_xml)
          fail Grape::Exceptions::InvalidFormatter.new(object.class, 'xml')
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
grape-0.11.0 lib/grape/formatter/xml.rb
grape-0.10.1 lib/grape/formatter/xml.rb
grape-0.10.0 lib/grape/formatter/xml.rb