Sha256: fe831fc2426a2421ca467cd6b3918db0108c01cec798f9118ac669e19f8c47a6

Contents?: true

Size: 278 Bytes

Versions: 8

Compression:

Stored size: 278 Bytes

Contents

module Grape
  module Formatter
    module Xml
      class << self

        def call(object, env)
          return object.to_xml if object.respond_to?(:to_xml)
          raise Grape::Exceptions::InvalidFormatter.new(object.class, 'xml')
        end

      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
grape-0.6.1 lib/grape/formatter/xml.rb
grape-0.6.0 lib/grape/formatter/xml.rb
grape-0.5.0 lib/grape/formatter/xml.rb
grape-0.4.1 lib/grape/formatter/xml.rb
grape-0.4.0 lib/grape/formatter/xml.rb
grape-0.3.2 lib/grape/formatter/xml.rb
grape-0.3.1 lib/grape/formatter/xml.rb
grape-0.3.0 lib/grape/formatter/xml.rb