class GoogleWebTranslate::CLI
Command line interface
Public Instance Methods
translate(string, from, to)
click to toggle source
# 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