RSDConditionalStepNavigatorObject
public struct RSDConditionalStepNavigatorObject : RSDConditionalStepNavigator, Decodable
RSDConditionalStepNavigatorObject is a concrete implementation of the RSDConditionalStepNavigator protocol.
-
An ordered list of steps to run for this task.
Declaration
Swift
public let steps : [RSDStep] -
A conditional rule to optionally associate with this step navigator.
Declaration
Swift
public var conditionalRule : RSDConditionalRule? -
A list of step markers to use for calculating progress.
Declaration
Swift
public var progressMarkers : [String]? -
Default initializer.
Declaration
Swift
public init(with steps: [RSDStep])Parameters
stepsAn ordered list of steps to run for this task.
-
Initialize from a
Decoder. This decoding method will use theRSDFactoryinstance associated with the decoder to decode thestepsand theconditionalRule.example:
let json = """ { "progressMarkers": ["step1", "step2", "step3"], "steps": [ { "identifier" : "step1", "type" : "instruction", "title" : "Step 1" }, { "identifier" : "step2", "type" : "instruction", "title" : "Step 2" }, { "identifier" : "step2b", "type" : "instruction", "title" : "Step 2b" }, { "identifier" : "step3", "type" : "instruction", "title" : "Step 3" } ], "conditionalRule" : {"type" : "medicationTracker"} } """.data(using: .utf8)! // our data in native (JSON) formatThrows
DecodingErrorDeclaration
Swift
public init(from decoder: Decoder) throwsParameters
decoderThe decoder to use to decode this instance.
View on GitHub
RSDConditionalStepNavigatorObject Structure Reference