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.



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

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.



4
5
6
# File 'lib/deepl/resources/text.rb', line 4

def detected_source_language
  @detected_source_language
end

#textObject (readonly)

Returns the value of attribute text.



4
5
6
# File 'lib/deepl/resources/text.rb', line 4

def text
  @text
end

Instance Method Details

#to_sObject



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

def to_s
  text
end