module Elasticsearch module API module Indices module Actions # Delete an index template. # # @example Delete a template named _mytemplate_ # # client.indices.delete_template name: 'mytemplate' # # @option arguments [String] :name The name of the template (*Required*) # @option arguments [Time] :timeout Explicit operation timeout # # @see http://www.elasticsearch.org/guide/reference/api/admin-indices-templates/ # def delete_template(arguments={}) raise ArgumentError, "Required argument 'name' missing" unless arguments[:name] method = 'DELETE' path = "_template/#{arguments[:name]}" 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) body = nil perform_request(method, path, params, body).body end end end end end