Class: Google::Apis::FormsV1::ChoiceQuestion
- Inherits:
-
Object
- Object
- Google::Apis::FormsV1::ChoiceQuestion
- 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 radio/checkbox/dropdown question.
Instance Attribute Summary collapse
-
#options ⇒ Array<Google::Apis::FormsV1::Option>
Required.
-
#shuffle ⇒ Boolean
(also: #shuffle?)
Whether the options should be displayed in random order for different instances of the quiz.
-
#type ⇒ String
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ChoiceQuestion
constructor
A new instance of ChoiceQuestion.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ ChoiceQuestion
Returns a new instance of ChoiceQuestion.
153 154 155 |
# File 'lib/google/apis/forms_v1/classes.rb', line 153 def initialize(**args) update!(**args) end |
Instance Attribute Details
#options ⇒ Array<Google::Apis::FormsV1::Option>
Required. List of options that a respondent must choose from.
Corresponds to the JSON property options
136 137 138 |
# File 'lib/google/apis/forms_v1/classes.rb', line 136 def @options end |
#shuffle ⇒ Boolean Also known as: shuffle?
Whether the options should be displayed in random order for different
instances of the quiz. This is often used to prevent cheating by respondents
who might be looking at another respondent's screen, or to address bias in a
survey that might be introduced by always putting the same options first or
last.
Corresponds to the JSON property shuffle
145 146 147 |
# File 'lib/google/apis/forms_v1/classes.rb', line 145 def shuffle @shuffle end |
#type ⇒ String
Required. The type of choice question.
Corresponds to the JSON property type
151 152 153 |
# File 'lib/google/apis/forms_v1/classes.rb', line 151 def type @type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
158 159 160 161 162 |
# File 'lib/google/apis/forms_v1/classes.rb', line 158 def update!(**args) @options = args[:options] if args.key?(:options) @shuffle = args[:shuffle] if args.key?(:shuffle) @type = args[:type] if args.key?(:type) end |