diff options
| author | Pepper <pepper@scannerjammer.com> | 2015-03-04 15:57:53 -0500 |
|---|---|---|
| committer | Pepper <pepper@scannerjammer.com> | 2015-03-04 15:57:53 -0500 |
| commit | 021842ec42b991e7a641ae26862d77b324ea05db (patch) | |
| tree | 81194a75da0ff1279af7346d6e50cd424c33bacb /Pb_Api/Param/__init__.py | |
| parent | 513526efe79ff90be5b23459253dd5f553ec73d6 (diff) | |
started oop code
Diffstat (limited to 'Pb_Api/Param/__init__.py')
| -rw-r--r-- | Pb_Api/Param/__init__.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Pb_Api/Param/__init__.py b/Pb_Api/Param/__init__.py new file mode 100644 index 0000000..af13a2a --- /dev/null +++ b/Pb_Api/Param/__init__.py @@ -0,0 +1,23 @@ +class Pb_Api_Param(object): + def name(self): + return self.name + def required(self): + return self.required + + def manually_set(self, *args): + if len(args) >= 1: + self._manually_set = args[0] + return self._manually_set + + def value(self, *args, **kwargs): + if len(args) >= 1: + self._value = args[0] + if not 'autogenerated' in kwargs: + self.manually_set(1) + self.is_ready(1) + return self._value + + def is_ready(self, *args): + if len(args) >= 1: + self._is_ready = args[0] + return self._is_ready or not self.required() |
