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



14
15
16
17
18
# File 'lib/translator_text/types/translation_result.rb', line 14

def detected_language
  if h = detectedLanguage['language']
    h.to_sym
  end
end