Module: DeepL
- Extended by:
- DeepL
- Included in:
- DeepL
- Defined in:
- lib/deepl.rb,
lib/deepl/api.rb,
lib/deepl/configuration.rb,
lib/deepl/requests/base.rb,
lib/deepl/requests/usage.rb,
lib/deepl/resources/base.rb,
lib/deepl/resources/text.rb,
lib/deepl/resources/usage.rb,
lib/deepl/exceptions/error.rb,
lib/deepl/requests/translate.rb,
lib/deepl/exceptions/bad_request.rb,
lib/deepl/exceptions/request_error.rb,
lib/deepl/exceptions/limit_exceeded.rb,
lib/deepl/exceptions/quota_exceeded.rb,
lib/deepl/exceptions/authorization_failed.rb
Overview
– Gem interface
Defined Under Namespace
Modules: Exceptions, Requests, Resources Classes: API, Configuration
Instance Method Summary collapse
-
#api ⇒ Object
– API shortcuts.
-
#configuration ⇒ Object
– Configuration.
- #configure {|configuration| ... } ⇒ Object
- #translate(text, source_lang, target_lang, options = {}) ⇒ Object
- #usage(options = {}) ⇒ Object
Instance Method Details
#api ⇒ Object
– API shortcuts
35 36 37 |
# File 'lib/deepl.rb', line 35 def api @api ||= API.new(configuration) end |
#configuration ⇒ Object
– Configuration
51 52 53 |
# File 'lib/deepl.rb', line 51 def configuration @configuration ||= Configuration.new end |
#configure {|configuration| ... } ⇒ Object
55 56 57 58 |
# File 'lib/deepl.rb', line 55 def configure yield configuration if block_given? configuration.validate! end |