Class: DeepL::Requests::Glossary::Destroy

Inherits:
Base
  • Object
show all
Defined in:
lib/deepl/requests/glossary/destroy.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#api, #options, #response

Instance Method Summary collapse

Methods inherited from Base

#details

Constructor Details

#initialize(api, id, options = {}) ⇒ Destroy

Returns a new instance of Destroy.



12
13
14
15
# File 'lib/deepl/requests/glossary/destroy.rb', line 12

def initialize(api, id, options = {})
  super(api, options)
  @id = id
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



10
11
12
# File 'lib/deepl/requests/glossary/destroy.rb', line 10

def id
  @id
end

Instance Method Details

#requestObject



17
18
19
# File 'lib/deepl/requests/glossary/destroy.rb', line 17

def request
  build_response(*execute_request_with_retries(delete_request))
end

#to_sObject



21
22
23
# File 'lib/deepl/requests/glossary/destroy.rb', line 21

def to_s
  "DELETE #{uri.request_uri}"
end