Class: GoogleWebTranslate::CLI
- Inherits:
-
Thor
- Object
- Thor
- GoogleWebTranslate::CLI
- Defined in:
- lib/google_web_translate/cli.rb
Overview
Command line interface
Instance Method Summary collapse
Instance Method Details
#translate(string, from, to) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/google_web_translate/cli.rb', line 9 def translate(string, from, to) = { debug: ENV['DEBUG'] } [:dt] = [:dt] if [:dt] api = API.new() result = api.translate(string, from, to) pp result.to_h end |