Class: Google::Apis::FormsV1::CorrectAnswers
- Inherits:
-
Object
- Object
- Google::Apis::FormsV1::CorrectAnswers
- 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 answer key for a question.
Instance Attribute Summary collapse
-
#answers ⇒ Array<Google::Apis::FormsV1::CorrectAnswer>
A list of correct answers.
Instance Method Summary collapse
-
#initialize(**args) ⇒ CorrectAnswers
constructor
A new instance of CorrectAnswers.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ CorrectAnswers
Returns a new instance of CorrectAnswers.
220 221 222 |
# File 'lib/google/apis/forms_v1/classes.rb', line 220 def initialize(**args) update!(**args) end |
Instance Attribute Details
#answers ⇒ Array<Google::Apis::FormsV1::CorrectAnswer>
A list of correct answers. A quiz response can be automatically graded based
on these answers. For single-valued questions, a response is marked correct if
it matches any value in this list (in other words, multiple correct answers
are possible). For multiple-valued (CHECKBOX
) questions, a response is
marked correct if it contains exactly the values in this list.
Corresponds to the JSON property answers
218 219 220 |
# File 'lib/google/apis/forms_v1/classes.rb', line 218 def answers @answers end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
225 226 227 |
# File 'lib/google/apis/forms_v1/classes.rb', line 225 def update!(**args) @answers = args[:answers] if args.key?(:answers) end |