Method: Elasticsearch::API::Utils#__extract_parts
- Defined in:
- lib/elasticsearch/api/utils.rb
#__extract_parts(arguments, valid_parts = []) ⇒ Array<String>
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.
Note:
Mutates the ‘arguments` argument, to prevent failures in `__validate_and_extract_params`.
Extracts the valid parts of the URL from the arguments
153 154 155 |
# File 'lib/elasticsearch/api/utils.rb', line 153 def __extract_parts(arguments, valid_parts=[]) Hash[arguments].reduce([]) { |sum, item| k, v = item; v.is_a?(TrueClass) ? sum << k.to_s : sum << v } end |