Added `load_variables()` to all.

development
Shawn Davis 3 years ago
parent 4ca551d2c9
commit 6abcede7e8
  1. 10
      scripttease/lib/contexts.py

@ -10,6 +10,7 @@ log = logging.getLogger(__name__)
# Exports # Exports
__all__ = ( __all__ = (
"load_variables",
"Context", "Context",
"Variable", "Variable",
) )
@ -85,6 +86,15 @@ class Context(object):
return v return v
def append(self, variable):
"""Append a variable to the context.
:param variable: The variable to be added to the context.
:type variable: scripttease.lib.contexts.Variable
"""
self.variables[variable.name] = variable
def mapping(self): def mapping(self):
"""Get the context as a dictionary. """Get the context as a dictionary.

Loading…
Cancel
Save