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 "=========TERMIT=========\nUsage:\ntermit 'source_language' 'target_language' 'text'\n\nExample:\ntermit en fr 'hey cowboy where is your horse?'\n=> 'hey cow-boy ou est votre cheval?'\n\nOptions:\n-t - speech synthesis\n-s - synonyms list\n\nCheck docs at: github.com/pawurb/termit\n" 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 |
#display_version ⇒ Object
26 27 28 |
# File 'lib/termit/output_manager.rb', line 26 def display_version puts "Termit #{Termit::VERSION}" end |