lib/elasticsearch/api/actions/indices/delete.rb in elasticsearch-api-0.4.0 vs lib/elasticsearch/api/actions/indices/delete.rb in elasticsearch-api-0.4.1

- old
+ new

@@ -29,16 +29,15 @@ # @option arguments [Time] :timeout Explicit operation timeout # # @see http://www.elasticsearch.org/guide/reference/api/admin-indices-delete-index/ # def delete(arguments={}) + valid_params = [ :timeout ] + method = 'DELETE' - path = Utils.__pathify( Utils.__listify(arguments[:index]) ) - params = arguments.select do |k,v| - [ :timeout ].include?(k) - end - # Normalize Ruby 1.8 and Ruby 1.9 Hash#select behaviour - params = Hash[params] unless params.is_a?(Hash) + path = Utils.__pathify Utils.__listify(arguments[:index]) + + params = Utils.__validate_and_extract_params arguments, valid_params body = nil perform_request(method, path, params, body).body end end