Method: AssemblyAI::Lemur::LemurQuestionAnswer.validate_raw

Defined in:
lib/assemblyai/lemur/types/lemur_question_answer.rb

.validate_raw(obj:) ⇒ Void

Leveraged for Union-type generation, validate_raw attempts to parse the given

hash and check each fields type against the current object's property
definitions.

Parameters:

  • obj (Object)

Returns:

  • (Void)


61
62
63
64
# File 'lib/assemblyai/lemur/types/lemur_question_answer.rb', line 61

def self.validate_raw(obj:)
  obj.question.is_a?(String) != false || raise("Passed value for field obj.question is not the expected type, validation failed.")
  obj.answer.is_a?(String) != false || raise("Passed value for field obj.answer is not the expected type, validation failed.")
end