Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
create_pkg_manifest.VarImpl Class Reference
Inheritance diagram for create_pkg_manifest.VarImpl:

Public Member Functions

 __init__ (self, local_scope)
 
 Lookup (self, var_name)
 

Protected Attributes

 _local_scope
 

Static Protected Attributes

dict _env_vars
 

Detailed Description

Definition at line 24 of file create_pkg_manifest.py.

Constructor & Destructor Documentation

◆ __init__()

create_pkg_manifest.VarImpl.__init__ (   self,
  local_scope 
)

Definition at line 30 of file create_pkg_manifest.py.

30 def __init__(self, local_scope):
31 self._local_scope = local_scope
32

Member Function Documentation

◆ Lookup()

create_pkg_manifest.VarImpl.Lookup (   self,
  var_name 
)
Implements the Var syntax.

Definition at line 33 of file create_pkg_manifest.py.

33 def Lookup(self, var_name):
34 """Implements the Var syntax."""
35 if var_name in self._local_scope.get("vars", {}):
36 return self._local_scope["vars"][var_name]
37 # Inject default values for env variables
38 if var_name in self._env_vars:
39 return self._env_vars[var_name]
40 raise Exception("Var is not defined: %s" % var_name)
41
42

Member Data Documentation

◆ _env_vars

dict create_pkg_manifest.VarImpl._env_vars
staticprotected
Initial value:
= {
"host_cpu": "x64",
"host_os": "linux",
}

Definition at line 25 of file create_pkg_manifest.py.

◆ _local_scope

create_pkg_manifest.VarImpl._local_scope
protected

Definition at line 31 of file create_pkg_manifest.py.


The documentation for this class was generated from the following file: