Class: Google::Apis::FormsV1::CorrectAnswer

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

A single correct answer for a question. For multiple-valued (CHECKBOX) questions, several CorrectAnswers may be needed to represent a single correct response option.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CorrectAnswer

Returns a new instance of CorrectAnswer.



197
198
199
# File 'lib/google/apis/forms_v1/classes.rb', line 197

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

Instance Attribute Details

#valueString

Required. The correct answer value. See the documentation for TextAnswer.value for details on how various value types are formatted. Corresponds to the JSON property value

Returns:

  • (String)


195
196
197
# File 'lib/google/apis/forms_v1/classes.rb', line 195

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



202
203
204
# File 'lib/google/apis/forms_v1/classes.rb', line 202

def update!(**args)
  @value = args[:value] if args.key?(:value)
end