Spectator::Result
Inherits Reference < Object
Base class that represents the outcome of running an example. Sub-classes contain additional information specific to the type of result.
Constructors
Constructs the base of the result. The example should refer to the example that was run and that this result is for.
Instance methods
Calls the corresponding method for the type of result. This is used to avoid placing if or case-statements everywhere based on type. Each sub-class implements this method by calling the correct method on interface.
Calls the corresponding method for the type of result. This is used to avoid placing if or case-statements everywhere based on type. Each sub-class implements this method by calling the correct method on interface. This variation takes a block, which is passed the result. The value returned from the block will be returned by this method.