Sha256: c8eb692a890250b918c00a29e8d873610f37dbacdcaf8920ff9e33ef9d878d87
Contents?: true
Size: 581 Bytes
Versions: 10
Compression:
Stored size: 581 Bytes
Contents
module Grape module Parser module Base class << self PARSERS = { json: Grape::Parser::Json, jsonapi: Grape::Parser::Json, xml: Grape::Parser::Xml } def parsers(options) PARSERS.merge(options[:parsers] || {}) end def parser_for(api_format, options = {}) spec = parsers(options)[api_format] case spec when nil nil when Symbol method(spec) else spec end end end end end end
Version data entries
10 entries across 10 versions & 2 rubygems