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

25 lines
485 B
Objective-C

#import "REAFunctionNode.h"
#import "REAParamNode.h"
#import "REANodesManager.h"
@implementation REAFunctionNode {
NSNumber *_nodeToBeEvaluated;
}
- (instancetype)initWithID:(REANodeID)nodeID config:(NSDictionary<NSString *,id> *)config
{
if ((self = [super initWithID:nodeID config:config])) {
_nodeToBeEvaluated = config[@"what"];
}
return self;
}
- (id)evaluate
{
REANode *node = [self.nodesManager findNodeByID:_nodeToBeEvaluated];
return [node value];
}
@end