Class: DeepL::Resources::Text

Inherits:
Base
  • Object
show all
Defined in:
lib/deepl/resources/text.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#request, #response

Instance Method Summary collapse

Constructor Details

#initialize(text, detected_source_language, *args) ⇒ Text

Returns a new instance of Text.



11
12
13
14
15
16
# File 'lib/deepl/resources/text.rb', line 11

def initialize(text, detected_source_language, *args)
  super(*args)

  @text = text
  @detected_source_language = detected_source_language
end

Instance Attribute Details

#detected_source_languageObject (readonly)

Returns the value of attribute detected_source_language.



9
10
11
# File 'lib/deepl/resources/text.rb', line 9

def detected_source_language
  @detected_source_language
end

#textObject (readonly)

Returns the value of attribute text.



9
10
11
# File 'lib/deepl/resources/text.rb', line 9

def text
  @text
end

Instance Method Details

#to_sObject



18
19
20
# File 'lib/deepl/resources/text.rb', line 18

def to_s
  text
end