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/content_types.rb, line 25 def content_types_for(from_settings) if from_settings.present? from_settings else Grape::ContentTypes::CONTENT_TYPES.merge(default_elements) end end
content_types_for_settings(settings)
click to toggle source
# File lib/grape/content_types.rb, line 19 def content_types_for_settings(settings) return if settings.blank? settings.each_with_object({}) { |value, result| result.merge!(value) } end