This repository has been archived on 2022-03-12. You can view files and clone it, but cannot push or open issues or pull requests.
2021-04-02 02:24:13 +03:00

26 lines
482 B
Objective-C

#import "REABlockNode.h"
#import "REANodesManager.h"
@implementation REABlockNode {
NSArray<NSNumber *> *_block;
}
- (instancetype)initWithID:(REANodeID)nodeID config:(NSDictionary<NSString *,id> *)config
{
if ((self = [super initWithID:nodeID config:config])) {
_block = config[@"block"];
}
return self;
}
- (id)evaluate
{
id result;
for (NSNumber *inputID in _block) {
result = [[self.nodesManager findNodeByID:inputID] value];
}
return result;
}
@end