| Total Complexity | 4 |
| Total Lines | 12 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | __author__ = "Jon Reid" |
||
| 9 | class StringStartsWith(SubstringMatcher): |
||
| 10 | |||
| 11 | def __init__(self, substring): |
||
| 12 | super(StringStartsWith, self).__init__(substring) |
||
| 13 | |||
| 14 | def _matches(self, item): |
||
| 15 | if not hasmethod(item, 'startswith'): |
||
| 16 | return False |
||
| 17 | return item.startswith(self.substring) |
||
| 18 | |||
| 19 | def relationship(self): |
||
| 20 | return 'starting with' |
||
| 21 | |||
| 40 |