TextualAnswer

public struct TextualAnswer : Answer

Answer to a string type Question

  • The string used as an answer to the Question

    Declaration

    Swift

    public let value: String
  • The identifier of the Question

    Declaration

    Swift

    public let questionId: String
  • The string used as an answer to the Question

    Declaration

    Swift

    public var codedValue: String { get }
  • Initializes a TextualAnswer given the string and Question

    • value: The actual answer string
    • question: The Question this answers

    Throws

    AnswerError.unacceptable if the question is not a string type

    Declaration

    Swift

    public init(_ value: String, question: Question) throws

    Return Value

    A TextualAnswer representing an Answer to the string type question