Class: DbBot::Translate
- Inherits:
-
Object
- Object
- DbBot::Translate
- Defined in:
- lib/db_bot/translate.rb
Defined Under Namespace
Classes: TranslateException
Instance Attribute Summary collapse
-
#collection ⇒ Object
Returns the value of attribute collection.
-
#number ⇒ Object
Returns the value of attribute number.
-
#query ⇒ Object
Returns the value of attribute query.
-
#response ⇒ Object
Returns the value of attribute response.
-
#search_query ⇒ Object
Returns the value of attribute search_query.
-
#table ⇒ Object
Returns the value of attribute table.
-
#target_attribute ⇒ Object
Returns the value of attribute target_attribute.
-
#verb ⇒ Object
Returns the value of attribute verb.
-
#when ⇒ Object
Returns the value of attribute when.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(message) ⇒ Translate
constructor
A new instance of Translate.
- #perform ⇒ Object
Constructor Details
#initialize(message) ⇒ Translate
Returns a new instance of Translate.
21 22 23 |
# File 'lib/db_bot/translate.rb', line 21 def initialize() = end |
Instance Attribute Details
#collection ⇒ Object
Returns the value of attribute collection.
7 8 9 |
# File 'lib/db_bot/translate.rb', line 7 def collection @collection end |
#number ⇒ Object
Returns the value of attribute number.
7 8 9 |
# File 'lib/db_bot/translate.rb', line 7 def number @number end |
#query ⇒ Object
Returns the value of attribute query.
7 8 9 |
# File 'lib/db_bot/translate.rb', line 7 def query @query end |
#response ⇒ Object
Returns the value of attribute response.
7 8 9 |
# File 'lib/db_bot/translate.rb', line 7 def response @response end |
#search_query ⇒ Object
Returns the value of attribute search_query.
7 8 9 |
# File 'lib/db_bot/translate.rb', line 7 def search_query @search_query end |
#table ⇒ Object
Returns the value of attribute table.
7 8 9 |
# File 'lib/db_bot/translate.rb', line 7 def table @table end |
#target_attribute ⇒ Object
Returns the value of attribute target_attribute.
7 8 9 |
# File 'lib/db_bot/translate.rb', line 7 def target_attribute @target_attribute end |
#verb ⇒ Object
Returns the value of attribute verb.
7 8 9 |
# File 'lib/db_bot/translate.rb', line 7 def verb @verb end |
#when ⇒ Object
Returns the value of attribute when.
7 8 9 |
# File 'lib/db_bot/translate.rb', line 7 def when @when end |
Class Method Details
.perform(*args) ⇒ Object
17 18 19 |
# File 'lib/db_bot/translate.rb', line 17 def self.perform(*args) return new(*args).tap { |use_case| use_case.perform } end |
Instance Method Details
#perform ⇒ Object
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/db_bot/translate.rb', line 25 def perform init_wit_client construct_entities process_verb rescue TranslateException => e @response = e. end |