Inherits from NSObject
Conforms to EFRequires
Declared in EFRequires.h
EFRequires.m

Overview

Expresses requirements that a value should conform too.

Tasks

Existence

Custom

Numbers

Logic

  • + either:or:

    Either or both of the (array of) requirements need to pass

  • + not:

    Negates the result of the (array of) requirement(s)

Other Methods

Class Methods

either:or:

Either or both of the (array of) requirements need to pass

+ (instancetype)either:(id<EFRequires>)requirements1 or:(id<EFRequires>)requirements2

Parameters

requirements1

An EFRequires instance, or an NSArray of EFRequires instances

requirements2

An EFRequires instance, or an NSArray of EFRequires instances

Return Value

EFRequires instance

Discussion

Either or both of the (array of) requirements need to pass

Declared In

EFRequires.h

equalTo:

Requires a value is equal to certain treshold

+ (instancetype)equalTo:(NSNumber *)value

Parameters

value

Threshold

Return Value

EFRequires instance

Discussion

Requires a value is equal to certain treshold

Declared In

EFRequires.h

exists

Requires a value exists

+ (instancetype)exists

Return Value

EFRequire instance

Discussion

Requires a value exists

Declared In

EFRequires.h

largerThan:

Requires a value is larger than certain treshold

+ (instancetype)largerThan:(NSNumber *)value

Parameters

value

Threshold

Return Value

EFRequires instance

Discussion

Requires a value is larger than certain treshold

Declared In

EFRequires.h

largerThanOrEqualTo:

Requires a value is larger than or equal to certain treshold

+ (instancetype)largerThanOrEqualTo:(NSNumber *)value

Parameters

value

Threshold

Return Value

EFRequires instance

Discussion

Requires a value is larger than or equal to certain treshold

Declared In

EFRequires.h

not:

Negates the result of the (array of) requirement(s)

+ (instancetype)not:(id<EFRequires>)requirements

Parameters

requirements

An EFRequires instance, or an NSArray of EFRequires instances

Return Value

EFRequires instance

Discussion

Negates the result of the (array of) requirement(s)

Declared In

EFRequires.h

passes:

Requires a value passes evaluation

+ (instancetype)passes:(EFMappingEvaluationBlock)evaluationBlock

Parameters

evaluationBlock

Block evaluating the value

Return Value

EFRequires instance

Discussion

Requires a value passes evaluation

Declared In

EFRequires.h

smallerThan:

Requires a value is smaller than certain treshold

+ (instancetype)smallerThan:(NSNumber *)value

Parameters

value

Threshold

Return Value

EFRequires instance

Discussion

Requires a value is smaller than certain treshold

Declared In

EFRequires.h

smallerThanOrEqualTo:

Requires a value is smaller than or equal to certain treshold

+ (instancetype)smallerThanOrEqualTo:(NSNumber *)value

Parameters

value

Threshold

Return Value

EFRequires instance

Discussion

Requires a value is smaller than or equal to certain treshold

Declared In

EFRequires.h

Instance Methods

evaluateForValue:

Evaluates if values conforms to requirement

- (BOOL)evaluateForValue:(id)value

Parameters

value

Value to evaluate

Return Value

YES if value passes validation, NO otherwise

Discussion

Evaluates if values conforms to requirement

Declared In

EFRequires.h