Class: DeepL::Requests::StyleRule::Destroy

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

Constant Summary

Constants inherited from Base

Base::MAX_GLOSSARY_IDS, Base::NETWORK_ERRORS, Base::RESPONSE_FORMAT_ERRORS, Base::RETRYABLE_NETWORK_ERRORS, Base::TECHNICAL_HEADERS

Instance Attribute Summary

Attributes inherited from Base

#api, #options, #response

Instance Method Summary collapse

Methods inherited from Base

accepted_options, accepts_options, #details, inherited, validate_options!

Constructor Details

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

Returns a new instance of Destroy.



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

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

Instance Method Details

#request ⇒ Object



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

def request
  build_response(*execute_request_with_retries(delete_request))
end

#to_s ⇒ Object



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

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