Class: Termit::TextResponseHandler
- Inherits:
-
Object
- Object
- Termit::TextResponseHandler
- Extended by:
- Delegation
- Defined in:
- lib/termit/text_response_handler.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(text, synonyms_wanted) ⇒ TextResponseHandler
constructor
A new instance of TextResponseHandler.
Methods included from Delegation
Constructor Details
#initialize(text, synonyms_wanted) ⇒ TextResponseHandler
Returns a new instance of TextResponseHandler.
8 9 10 11 |
# File 'lib/termit/text_response_handler.rb', line 8 def initialize text, synonyms_wanted @text = decode text @synonyms_wanted = synonyms_wanted end |
Instance Method Details
#call ⇒ Object
13 14 15 16 17 18 |
# File 'lib/termit/text_response_handler.rb', line 13 def call translation = extract_translation display_translation translation display_synonyms extract_synonyms if @synonyms_wanted translation end |