module Grape::ContentTypes
Constants
- CONTENT_TYPES
Content types are listed in order of preference.
Public Class Methods
content_types_for(from_settings)
click to toggle source
# File lib/grape/util/content_types.rb, line 18 def self.content_types_for(from_settings) if from_settings.present? from_settings else Grape::ContentTypes::CONTENT_TYPES end end
content_types_for_settings(settings)
click to toggle source
# File lib/grape/util/content_types.rb, line 12 def self.content_types_for_settings(settings) return if settings.blank? settings.each_with_object({}) { |value, result| result.merge!(value) } end