Module: UrlParamsManager

Defined in:
lib/url_params_manager.rb,
lib/url_params_manager/service.rb,
lib/url_params_manager/version.rb,
lib/url_params_manager/unrecognised_prefix_error.rb

Defined Under Namespace

Classes: Service, UnrecognisedPrefixError

Constant Summary collapse

VERSION =
'0.5.0'

Class Method Summary collapse

Class Method Details

.for(url_to_filter_params: nil, indexed_url_params_order: nil, app_url_helpers: nil, default_params: {}, always_lists_fields: {}, position_defined_url_params: nil, filter_params_treatment: UrlParamsManager::Service::UNITY_FUNCTION, filter_params_pretreatment: UrlParamsManager::Service::UNITY_FUNCTION) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/url_params_manager.rb', line 7

def self.for(url_to_filter_params: nil,
  indexed_url_params_order: nil,
  app_url_helpers: nil,
  default_params: {},
  always_lists_fields: {},
  position_defined_url_params: nil,
  filter_params_treatment: UrlParamsManager::Service::UNITY_FUNCTION,
  filter_params_pretreatment: UrlParamsManager::Service::UNITY_FUNCTION
)
  Service.new url_to_filter_params:        url_to_filter_params,
              indexed_url_params_order:    indexed_url_params_order,
              app_url_helpers:             app_url_helpers,
              default_params:              default_params,
              filter_params_treatment:     filter_params_treatment,
              filter_params_pretreatment:  filter_params_pretreatment,
              position_defined_url_params: position_defined_url_params,
              always_lists_fields:         always_lists_fields

end