Class: Google::Apis::FormsV1::TextAnswer

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

An answer to a question represented as text.

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#valueString

Output only. The answer value. Formatting used for different kinds of question:

  • ChoiceQuestion * RADIO or DROP_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 for CHECKBOX choices. Corresponds to the JSON property value

Returns:

  • (String)


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