Class: DeepL::Requests::StyleRule::FindCustomInstruction

Inherits:
Base
  • Object
show all
Includes:
Helpers
Defined in:
lib/deepl/requests/style_rule/find_custom_instruction.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, instruction_id, options = {}) ⇒ FindCustomInstruction

Returns a new instance of FindCustomInstruction.



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

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

Instance Method Details

#request ⇒ Object



18
19
20
# File 'lib/deepl/requests/style_rule/find_custom_instruction.rb', line 18

def request
  build_custom_instruction(*execute_request_with_retries(get_request))
end

#to_s ⇒ Object



22
23
24
# File 'lib/deepl/requests/style_rule/find_custom_instruction.rb', line 22

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