Sha256: 99d95b0543f1659f561c7a28f63070670e266e2e274911d81237126619b4bb35

Contents?: true

Size: 277 Bytes

Versions: 18

Compression:

Stored size: 277 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

18 entries across 18 versions & 2 rubygems

Version Path
grape-extra_validators-2.0.0 vendor/bundle/ruby/2.6.0/gems/grape-1.2.5/lib/grape/formatter/xml.rb
grape-extra_validators-1.0.0 vendor/bundle/ruby/2.4.0/gems/grape-1.2.5/lib/grape/formatter/xml.rb
grape-1.2.5 lib/grape/formatter/xml.rb
grape-1.2.4 lib/grape/formatter/xml.rb
grape-1.2.3 lib/grape/formatter/xml.rb
grape-1.2.2 lib/grape/formatter/xml.rb
grape-1.2.1 lib/grape/formatter/xml.rb
grape-1.2.0 lib/grape/formatter/xml.rb
grape-1.1.0 lib/grape/formatter/xml.rb
grape-1.0.3 lib/grape/formatter/xml.rb
grape-1.0.2 lib/grape/formatter/xml.rb
grape-1.0.1 lib/grape/formatter/xml.rb
grape-1.0.0 lib/grape/formatter/xml.rb
grape-0.19.2 lib/grape/formatter/xml.rb
grape-0.19.1 lib/grape/formatter/xml.rb
grape-0.19.0 lib/grape/formatter/xml.rb
grape-0.18.0 lib/grape/formatter/xml.rb
grape-0.17.0 lib/grape/formatter/xml.rb