Class: Termit::OutputManager
- Inherits:
-
Object
- Object
- Termit::OutputManager
- Defined in:
- lib/termit/output_manager.rb
Instance Method Summary collapse
- #display_error_info ⇒ Object
- #display_help ⇒ Object
- #display_synonyms(synonyms) ⇒ Object
- #display_translation(text) ⇒ Object
- #display_version ⇒ Object
Instance Method Details
#display_error_info ⇒ Object
4 5 6 |
# File 'lib/termit/output_manager.rb', line 4 def display_error_info puts "TERMIT: Wrong data. Example: 'termit en es the cowboy ' => 'el vaquero" end |
#display_help ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/termit/output_manager.rb', line 8 def display_help puts <<-EOS =========TERMIT========= USAGE: termit 'source_language' 'target_language' 'text' Example: termit en fr 'hey cowboy where is your horse?' => 'hey cow-boy ou est votre cheval?' Options: -t - speech synthesis -s - synonyms list Check docs at: github.com/pawurb/termit EOS end |
#display_synonyms(synonyms) ⇒ Object
35 36 37 38 |
# File 'lib/termit/output_manager.rb', line 35 def display_synonyms synonyms print '=> Synonyms: ' puts synonyms end |
#display_translation(text) ⇒ Object
30 31 32 33 |
# File 'lib/termit/output_manager.rb', line 30 def display_translation text print "=> " puts text end |