Class: Google::Apis::FormsV1::TextAnswer
- Inherits:
-
Object
- Object
- Google::Apis::FormsV1::TextAnswer
- 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
An answer to a question represented as text.
Instance Attribute Summary collapse
-
#value ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ TextAnswer
constructor
A new instance of TextAnswer.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ TextAnswer
Returns a new instance of TextAnswer.
1427 1428 1429 |
# File 'lib/google/apis/forms_v1/classes.rb', line 1427 def initialize(**args) update!(**args) end |
Instance Attribute Details
#value ⇒ String
Output only. The answer value. Formatting used for different kinds of question:
- ChoiceQuestion *
RADIO
orDROP_DOWN
: A single string corresponding to the option that was selected. *CHECKBOX
: Multiple strings corresponding to each option that was selected. * TextQuestion: The text that the user entered. - ScaleQuestion: A string containing the number that was selected. *
DateQuestion * Without time or year: MM-DD e.g. "05-19" * With year: YYYY-MM-
DD e.g. "1986-05-19" * With time: MM-DD HH:MM e.g. "05-19 14:51" * With year
and time: YYYY-MM-DD HH:MM e.g. "1986-05-19 14:51" * TimeQuestion: String with
time or duration in HH:MM format e.g. "14:51" * RowQuestion within
QuestionGroupItem: The answer for each row of a QuestionGroupItem is
represented as a separate Answer. Each will contain one string for
RADIO
- type choices or multiple strings forCHECKBOX
choices. Corresponds to the JSON propertyvalue
1425 1426 1427 |
# File 'lib/google/apis/forms_v1/classes.rb', line 1425 def value @value end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1432 1433 1434 |
# File 'lib/google/apis/forms_v1/classes.rb', line 1432 def update!(**args) @value = args[:value] if args.key?(:value) end |