Sha256: 7965eda9e06f983a949cfcab3d2398e5e48767dda86a7221c33e1152e8328050

Contents?: true

Size: 276 Bytes

Versions: 6

Compression:

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

6 entries across 6 versions & 1 rubygems

Version Path
grape-0.16.2 lib/grape/formatter/xml.rb
grape-0.16.1 lib/grape/formatter/xml.rb
grape-0.15.0 lib/grape/formatter/xml.rb
grape-0.14.0 lib/grape/formatter/xml.rb
grape-0.13.0 lib/grape/formatter/xml.rb
grape-0.12.0 lib/grape/formatter/xml.rb