Class: Google::Apis::FormsV1::Answer

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/forms_v1/classes.rb,
lib/google/apis/forms_v1/representations.rb,
lib/google/apis/forms_v1/representations.rb

Overview

The submitted answer for a question.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Answer

Returns a new instance of Answer.



49
50
51
# File 'lib/google/apis/forms_v1/classes.rb', line 49

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#file_upload_answersGoogle::Apis::FormsV1::FileUploadAnswers

All submitted files for a FileUpload question. Corresponds to the JSON property fileUploadAnswers



32
33
34
# File 'lib/google/apis/forms_v1/classes.rb', line 32

def file_upload_answers
  @file_upload_answers
end

#gradeGoogle::Apis::FormsV1::Grade

Grade information associated with a respondent's answer to a question. Corresponds to the JSON property grade



37
38
39
# File 'lib/google/apis/forms_v1/classes.rb', line 37

def grade
  @grade
end

#question_idString

Output only. The question's ID. See also Question.question_id. Corresponds to the JSON property questionId

Returns:

  • (String)


42
43
44
# File 'lib/google/apis/forms_v1/classes.rb', line 42

def question_id
  @question_id
end

#text_answersGoogle::Apis::FormsV1::TextAnswers

A question's answers as text. Corresponds to the JSON property textAnswers



47
48
49
# File 'lib/google/apis/forms_v1/classes.rb', line 47

def text_answers
  @text_answers
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



54
55
56
57
58
59
# File 'lib/google/apis/forms_v1/classes.rb', line 54

def update!(**args)
  @file_upload_answers = args[:file_upload_answers] if args.key?(:file_upload_answers)
  @grade = args[:grade] if args.key?(:grade)
  @question_id = args[:question_id] if args.key?(:question_id)
  @text_answers = args[:text_answers] if args.key?(:text_answers)
end