Class: TranslatorText::Types::TranslationResult

Inherits:
Dry::Struct
  • Object
show all
Includes:
JSON
Defined in:
lib/translator_text/types/translation_result.rb

Instance Method Summary collapse

Methods included from JSON

#to_json

Instance Method Details

#detected_languageSymbol

Returns the detected language

Returns:



16
17
18
19
20
# File 'lib/translator_text/types/translation_result.rb', line 16

def detected_language
  return unless (h = detectedLanguage['language'])

  h.to_sym
end