niemeyer | f57df0b | 2005-02-23 18:31:49 +0000 | [diff] [blame] | 1 | from rrule import * |
| 2 | |
gl@clarisys.fr | fe750f2 | 2011-11-02 15:42:29 +0100 | [diff] [blame] | 3 | class rrulewrapper(object): |
niemeyer | f57df0b | 2005-02-23 18:31:49 +0000 | [diff] [blame] | 4 | def __init__(self, freq, **kwargs): |
| 5 | self._construct = kwargs.copy() |
| 6 | self._construct["freq"] = freq |
| 7 | self._rrule = rrule(**self._construct) |
| 8 | |
| 9 | def __getattr__(self, name): |
| 10 | if name in self.__dict__: |
| 11 | return self.__dict__[name] |
| 12 | return getattr(self._rrule, name) |
| 13 | |
| 14 | def set(self, **kwargs): |
| 15 | self._construct.update(kwargs) |
| 16 | self._rrule = rrule(**self._construct) |