mirror of
https://github.com/RevenueCat/purchases-ios
synced 2026-11-11 22:55:55 +05:45
23 lines
500 B
Swift
23 lines
500 B
Swift
//
|
|||
|
|
// RootVarOperator.swift
|
||
|
|
//
|
||
|
|
// Created by Antonio Pallares.
|
||
|
|
//
|
||
|
|
|
||
|
|
import Foundation
|
||
|
|
|
||
|
|
extension RulesEngine {
|
||
|
|
|
||
|
|
/// `rc.rootVar` — like `var`, but reads from the root data scope.
|
||
|
|
enum RootVarOperator {
|
||
|
|
|
||
|
|
static func opRootVar(args: Value, vars: Scope) throws -> Value {
|
||
|
|
try AccessorOperators.resolveVar(
|
||
|
|
args: args,
|
||
|
|
target: vars.root,
|
||
|
|
vars: vars,
|
||
|
|
operatorName: "rc.rootVar"
|
||
|
|
)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|