Completed
Pull Request — master (#1064)
by Dmitry
04:46
created

OnLogRecord.__init__()   A

Complexity

Conditions 1

Size

Total Lines 2

Duplication

Lines 0
Ratio 0 %
Metric Value
cc 1
dl 0
loc 2
rs 10
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