lib/deepl.rb in deepl-rb-0.0.1 vs lib/deepl.rb in deepl-rb-1.0.0

- old
+ new

@@ -29,14 +29,13 @@ def api @api ||= API.new(configuration) end - def translate(text, options = {}) + def translate(text, source_lang, target_lang, options = {}) configure if @configuration.nil? - Requests::TranslateText.new(api, text, fetch(options, :source_lang), - fetch(options, :target_lang)).request + Requests::TranslateText.new(api, text, source_lang, target_lang, options).request end # -- Configuration def configuration @@ -44,13 +43,7 @@ end def configure yield configuration if block_given? configuration.validate! - end - - private - - def fetch(hash, key) - hash[key.to_s] || hash[key.to_sym] end end