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

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