Method: MarkLogic::Collection#drop

Defined in:
lib/marklogic/collection.rb

#dropObject

Raises:

  • (Exception)


104
105
106
107
108
# File 'lib/marklogic/collection.rb', line 104

def drop
  url = "/v1/search?collection=#{collection}"
  response =@database.connection.delete(url)
  raise Exception.new("Invalid response: #{response.code.to_i}, #{response.body}") unless [204].include? response.code.to_i
end