Command line interface
9 10 11 12 13 14 15 16
# File 'lib/google_web_translate/cli.rb', line 9 def translate(string, from, to) api_options = { debug: ENV['DEBUG'] } api_options[:dt] = options[:dt] if options[:dt] api = API.new(api_options) result = api.translate(string, from, to) pp result.to_h end