GT2/Ejectable/node_modules/react-native-reanimated/ios/Nodes/REAFunctionNode.m

25 lines
485 B
Mathematica
Raw Normal View History

2021-08-16 00:14:59 +00:00
#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