RSDComparableSurveyRuleObject
public struct RSDComparableSurveyRuleObject<T : Codable> : RSDComparableSurveyRule, Codable
RSDComparableSurveyRuleObject is a survey rule that matches an expected result to the answer and vends a skip
identifier if the match is evaluated to true.
-
Optional skip identifier for this rule. If available, this will be used as the skip identifier, otherwise the
skipToIdentifierwill be assumed to beRSDIdentifier.exitDeclaration
Swift
public let skipToIdentifier: String? -
The rule operator to apply. If
nil,.equalwill be assumed unless theexpectedAnsweris also nil, in which case.skipwill be assumed.Declaration
Swift
public let ruleOperator: RSDSurveyRuleOperator? -
Expected answer for the rule. If
nil, then the operator must be .skip or this will return a nil value.Declaration
Swift
public var matchingAnswer: Any? -
Undocumented
Declaration
Swift
public let matchingValue: Value? -
Default initializer.
Declaration
Swift
public init(skipToIdentifier: String?, matchingValue: Value?, ruleOperator: RSDSurveyRuleOperator?)Parameters
skipToIdentifierSkip identifier for this rule.
matchingValueValue-typed matching answer.
ruleOperatorThe rule operator to apply.
-
Initialize from a
Decoder. This method will decode the values and also check that the combination of inputs is valid.Throws
DecodingErrorif there is a decoding error.Declaration
Swift
public init(from decoder: Decoder) throwsParameters
decoderThe decoder to use to decode this instance.
View on GitHub
RSDComparableSurveyRuleObject Structure Reference