Class: Google::Cloud::Translate::Translation
- Inherits:
-
Object
- Object
- Google::Cloud::Translate::Translation
- Defined in:
- lib/google/cloud/translate/translation.rb
Overview
Translation
Represents a translation query result. Returned by Api#translate.
Instance Attribute Summary collapse
-
#from ⇒ Object
(also: #source)
readonly
The source language from which the text was translated.
-
#origin ⇒ String
readonly
The original query text that was translated.
-
#text ⇒ String
(also: #to_s, #to_str)
readonly
The translated result.
-
#to ⇒ String
(also: #language, #target)
readonly
The target language into which the text was translated.
Instance Method Summary collapse
-
#detected? ⇒ Boolean
Determines if the source language was detected by the Google Cloud Translate API.
Instance Attribute Details
#from ⇒ Object (readonly) Also known as: source
The source language from which the text was translated.
68 69 70 |
# File 'lib/google/cloud/translate/translation.rb', line 68 def from @from end |
#origin ⇒ String (readonly)
The original query text that was translated.
56 57 58 |
# File 'lib/google/cloud/translate/translation.rb', line 56 def origin @origin end |
#text ⇒ String (readonly) Also known as: to_s, to_str
The translated result.
48 49 50 |
# File 'lib/google/cloud/translate/translation.rb', line 48 def text @text end |
#to ⇒ String (readonly) Also known as: language, target
The target language into which the text was translated.
62 63 64 |
# File 'lib/google/cloud/translate/translation.rb', line 62 def to @to end |
Instance Method Details
#detected? ⇒ Boolean
Determines if the source language was detected by the Google Cloud Translate API.
88 89 90 |
# File 'lib/google/cloud/translate/translation.rb', line 88 def detected? @detected end |