Class: Verbalizeit::Task
- Inherits:
-
Object
- Object
- Verbalizeit::Task
- Defined in:
- lib/verbalizeit/task.rb
Class Method Summary collapse
Instance Method Summary collapse
- #completed_at ⇒ Object
- #created_at ⇒ Object
- #download_url ⇒ Object
- #due_at ⇒ Object
- #id ⇒ Object
-
#initialize(task, client) ⇒ Task
constructor
A new instance of Task.
- #operation ⇒ Object
- #postback_url ⇒ Object
- #price_amount ⇒ Object
- #price_currency ⇒ Object
- #project_name ⇒ Object
- #reviewer ⇒ Object
- #rush_order ⇒ Object
- #source_download_url ⇒ Object
- #source_filename ⇒ Object
- #source_language ⇒ Object
- #special_instructions ⇒ Object
- #status ⇒ Object
- #status_url ⇒ Object
- #target_language ⇒ Object
- #translation_units ⇒ Object
- #translation_units_complete ⇒ Object
- #translator ⇒ Object
- #unit_count ⇒ Object
- #unit_type ⇒ Object
- #url ⇒ Object
Constructor Details
#initialize(task, client) ⇒ Task
Returns a new instance of Task.
8 9 10 11 |
# File 'lib/verbalizeit/task.rb', line 8 def initialize(task, client) @task = task @client = client end |
Class Method Details
.from(body, client) ⇒ Object
4 5 6 |
# File 'lib/verbalizeit/task.rb', line 4 def self.from(body, client) new(body, client) end |
Instance Method Details
#completed_at ⇒ Object
53 54 55 |
# File 'lib/verbalizeit/task.rb', line 53 def completed_at @task["completed_at"] end |
#created_at ⇒ Object
57 58 59 |
# File 'lib/verbalizeit/task.rb', line 57 def created_at @task["created_at"] end |
#download_url ⇒ Object
65 66 67 |
# File 'lib/verbalizeit/task.rb', line 65 def download_url @task["download_url"] end |
#due_at ⇒ Object
49 50 51 |
# File 'lib/verbalizeit/task.rb', line 49 def due_at @task["due_at"] end |
#id ⇒ Object
13 14 15 |
# File 'lib/verbalizeit/task.rb', line 13 def id @task["id"] end |
#operation ⇒ Object
61 62 63 |
# File 'lib/verbalizeit/task.rb', line 61 def operation @task["operation"] end |
#postback_url ⇒ Object
101 102 103 |
# File 'lib/verbalizeit/task.rb', line 101 def postback_url @task["postback_url"] end |
#price_amount ⇒ Object
45 46 47 |
# File 'lib/verbalizeit/task.rb', line 45 def price_amount @task["price_amount"] end |
#price_currency ⇒ Object
41 42 43 |
# File 'lib/verbalizeit/task.rb', line 41 def price_currency @task["price_currency"] end |
#project_name ⇒ Object
29 30 31 |
# File 'lib/verbalizeit/task.rb', line 29 def project_name @task["project_name"] end |
#reviewer ⇒ Object
97 98 99 |
# File 'lib/verbalizeit/task.rb', line 97 def reviewer Translator.new(@task["reviewer"]) end |
#rush_order ⇒ Object
25 26 27 |
# File 'lib/verbalizeit/task.rb', line 25 def rush_order @task["rush_order"] end |
#source_download_url ⇒ Object
69 70 71 |
# File 'lib/verbalizeit/task.rb', line 69 def source_download_url @task["source_download_url"] end |
#source_filename ⇒ Object
73 74 75 |
# File 'lib/verbalizeit/task.rb', line 73 def source_filename @task["source_filename"] end |
#source_language ⇒ Object
33 34 35 |
# File 'lib/verbalizeit/task.rb', line 33 def source_language Language.find_by_language_region_code(@client.languages, @task["source_language"]) end |
#special_instructions ⇒ Object
109 110 111 |
# File 'lib/verbalizeit/task.rb', line 109 def special_instructions @task["special_instructions"] end |
#status ⇒ Object
21 22 23 |
# File 'lib/verbalizeit/task.rb', line 21 def status @task["status"] end |
#status_url ⇒ Object
105 106 107 |
# File 'lib/verbalizeit/task.rb', line 105 def status_url @task["status_url"] end |
#target_language ⇒ Object
37 38 39 |
# File 'lib/verbalizeit/task.rb', line 37 def target_language Language.find_by_language_region_code(@client.languages, @task["target_language"]) end |
#translation_units ⇒ Object
85 86 87 |
# File 'lib/verbalizeit/task.rb', line 85 def translation_units @task["translation_units"] end |
#translation_units_complete ⇒ Object
89 90 91 |
# File 'lib/verbalizeit/task.rb', line 89 def translation_units_complete @task["translation_units_complete"] end |
#translator ⇒ Object
93 94 95 |
# File 'lib/verbalizeit/task.rb', line 93 def translator Translator.new(@task["translator"]) end |
#unit_count ⇒ Object
77 78 79 |
# File 'lib/verbalizeit/task.rb', line 77 def unit_count @task["unit_count"] end |
#unit_type ⇒ Object
81 82 83 |
# File 'lib/verbalizeit/task.rb', line 81 def unit_type @task["unit_type"] end |
#url ⇒ Object
17 18 19 |
# File 'lib/verbalizeit/task.rb', line 17 def url @task["url"] end |