Class: Bt::Translator
- Inherits:
-
Object
- Object
- Bt::Translator
- Defined in:
- lib/bt/translator.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(options) ⇒ Translator
constructor
A new instance of Translator.
Constructor Details
#initialize(options) ⇒ Translator
Returns a new instance of Translator.
3 4 5 6 7 |
# File 'lib/bt/translator.rb', line 3 def initialize = # initial url @url = Bt::UrlConstructor.new().url end |
Instance Method Details
#call ⇒ Object
9 10 11 12 13 |
# File 'lib/bt/translator.rb', line 9 def call # fetch data then use ResponseHandler to handle it response = Bt::DataFetcher.new(@url).data @text = Bt::ResponseHandler.new(response.body).call end |