diff options
| m--------- | photoblaster | 0 | ||||
| -rw-r--r-- | ricky/param/option.py | 16 | ||||
| -rw-r--r-- | ricky/param/options.py | 28 |
3 files changed, 0 insertions, 44 deletions
diff --git a/photoblaster b/photoblaster -Subproject 0545fd1d7f25c09dd8a6c92ada4b12f1b992de6 +Subproject 6b2d24f274f162ad0f5cef78a8b1fe50d2fd509 diff --git a/ricky/param/option.py b/ricky/param/option.py deleted file mode 100644 index 0cbd505..0000000 --- a/ricky/param/option.py +++ /dev/null @@ -1,16 +0,0 @@ -""" -Base option class...essentially a dictionary -but attributes can be accessed with a dot -""" - - -class Option(dict): - def __init__(self, **kwargs): - super(Option, self).__init__(**kwargs) - - def __getattr__(self, attr): - return self.get(attr) - - __setattr__ = dict.__setitem__ - - __delattr__ = dict.__delitem__ diff --git a/ricky/param/options.py b/ricky/param/options.py deleted file mode 100644 index dadb8f9..0000000 --- a/ricky/param/options.py +++ /dev/null @@ -1,28 +0,0 @@ -from ricky.param.option import Option - - -class Options: - def __init__(self, *args): - self._values = args - - def __iter__(self): - return iter(self._values) - - def __len__(self): - return len(self._values) - - def __str__(self): - return str(self._values) - - def __getitem__(self, i): - return self._values[i] - - def search(self, s): - for i in self: - if str(s) in i.value: - return i - - @classmethod - def from_dict(cls, *args): - options = map(lambda x: Option(**x), args) - return cls(*options) |
