Class: JsonapiCompliable::Util::FieldParams Private

Inherits:
Object
  • Object
show all
Defined in:
lib/jsonapi_compliable/util/field_params.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Class Method Summary collapse

Class Method Details

.parse(params) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



5
6
7
8
9
10
11
12
13
# File 'lib/jsonapi_compliable/util/field_params.rb', line 5

def self.parse(params)
  return {} if params.nil?

  {}.tap do |parsed|
    params.each_pair do |key, value|
      parsed[key.to_sym] = value.split(',').map(&:to_sym)
    end
  end
end