Sha256: 5cc758d05d6fc49bfe9ada6221f5c0599a041a49eb13360dc2013c8e0f753f94

Contents?: true

Size: 229 Bytes

Versions: 2

Compression:

Stored size: 229 Bytes

Contents

module Grape
  module Formatter
    module Roar
      class << self
        def call(object, env)
          object.respond_to?(:to_json) ? object.to_json(env: env) : MultiJson.dump(object)
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
grape-roar-0.3.0 lib/grape/roar/formatter.rb
grape-roar-0.2.0 lib/grape/roar/formatter.rb