Class: Termit::TextResponseHandler

Inherits:
Object
  • Object
show all
Includes:
CanOutput
Defined in:
lib/termit/text_response_handler.rb

Instance Method Summary collapse

Methods included from CanOutput

included

Constructor Details

#initialize(text) ⇒ TextResponseHandler

Returns a new instance of TextResponseHandler.



9
10
11
# File 'lib/termit/text_response_handler.rb', line 9

def initialize text
  @text = decode text
end

Instance Method Details

#callObject



13
14
15
16
17
# File 'lib/termit/text_response_handler.rb', line 13

def call
  translation = extract_translation
  display_translation translation
  translation
end