Sha256: 924dfc424f1a1ddb4d05a111b26a5273b33301efc3273a340b57fcd15b97182f
Contents?: true
Size: 550 Bytes
Versions: 11
Compression:
Stored size: 550 Bytes
Contents
module Grape module Parser module Base class << self PARSERS = { :json => 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
11 entries across 11 versions & 1 rubygems