src/PlatformInfo.js
function PlatformInfo(PlatformCtor, platformId) {

    this._Ctor = PlatformCtor;
    this._platformId = platformId;

    // Prefix all platform-specific args with the platform name
    var argSpec = PlatformCtor.getArgs ? PlatformCtor.getArgs() : {};
    this._argSpec = {};
    for (var cmd in argSpec) {
        var cmdArgSpec = argSpec[cmd];
        var platformCmdArgSpec = {};
        for (var key in cmdArgSpec) {
            platformCmdArgSpec["--" + platformId + "-" + key] = cmdArgSpec[key];
        }
        this._argSpec[cmd] = platformCmdArgSpec;
    }

    // Look for platforms env vars
    this._envSpec = PlatformCtor.getEnv ? PlatformCtor.getEnv() : {};
}
function PlatformInfo(PlatformCtor, platformId) {

    this._Ctor = PlatformCtor;
    this._platformId = platformId;

    // Prefix all platform-specific args with the platform name
    var argSpec = PlatformCtor.getArgs ? PlatformCtor.getArgs() : {};
    this._argSpec = {};
    for (var cmd in argSpec) {
        var cmdArgSpec = argSpec[cmd];
        var platformCmdArgSpec = {};
        for (var key in cmdArgSpec) {
            platformCmdArgSpec["--" + platformId + "-" + key] = cmdArgSpec[key];
        }
        this._argSpec[cmd] = platformCmdArgSpec;
    }

    // Look for platforms env vars
    this._envSpec = PlatformCtor.getEnv ? PlatformCtor.getEnv() : {};
}
function PlatformInfo ( PlatformCtor , platformId ) { this . _Ctor = PlatformCtor ; this . _platformId = platformId ; // Prefix all platform-specific args with the platform name var argSpec = PlatformCtor . getArgs ? PlatformCtor . getArgs ( ) : { } ; this . _argSpec = { } ; for ( var cmd in argSpec ) { var cmdArgSpec = argSpec [ cmd ] ; var platformCmdArgSpec = { } ; for ( var key in cmdArgSpec ) { platformCmdArgSpec [ "--" + platformId + "-" + key ] = cmdArgSpec [ key ] ; } this . _argSpec [ cmd ] = platformCmdArgSpec ; } // Look for platforms env vars this . _envSpec = PlatformCtor . getEnv ? PlatformCtor . getEnv ( ) : { } ; }
Encapsulates static backend information, does not depend on an instance.
@param {Function} PlatformCtor Constructor function for the platform
@param {String} platformId Name for the platform, "android", "ios", ...
@constructor
Encapsulates static backend information does not depend on an instance .