Module: Elasticsearch::API::Actions::ParamsRegistry
- Extended by:
- ParamsRegistry
- Included in:
- ParamsRegistry
- Defined in:
- lib/elasticsearch/api/actions/params_registry.rb
Constant Summary collapse
- PARAMS =
A Mapping of all the actions to their list of valid params.
{}
Instance Method Summary collapse
-
#get(action) ⇒ Array<Symbol>
Get the list of valid params for a given action.
-
#register(action, valid_params) ⇒ Object
Register an action with its list of valid params.
Instance Method Details
#get(action) ⇒ Array<Symbol>
Get the list of valid params for a given action.
39 40 41 |
# File 'lib/elasticsearch/api/actions/params_registry.rb', line 39 def get(action) PARAMS.fetch(action, []) end |
#register(action, valid_params) ⇒ Object
Register an action with its list of valid params.
25 26 27 |
# File 'lib/elasticsearch/api/actions/params_registry.rb', line 25 def register(action, valid_params) PARAMS[action.to_sym] = valid_params end |