| Total Complexity | 2 |
| Total Lines | 14 |
| Duplicated Lines | 0 % |
| 1 | class OnLogRecord(object): |
||
| 2 | """Trigger a callback when a certain log record is found. |
||
| 3 | |||
| 4 | Parameters |
||
| 5 | ---------- |
||
| 6 | record_name : str |
||
| 7 | The record name to check. |
||
| 8 | |||
| 9 | """ |
||
| 10 | def __init__(self, record_name): |
||
| 11 | self.record_name = record_name |
||
| 12 | |||
| 13 | def __call__(self, log): |
||
| 14 | return bool(log.current_row.get(self.record_name, False)) |
||
| 15 |