| Total Complexity | 3 |
| Total Lines | 14 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | # Licensed to the StackStorm, Inc ('StackStorm') under one or more |
||
| 19 | class KeyReference(object): |
||
| 20 | """ |
||
| 21 | Holds a reference to key given name and prefix. For example, if key name is foo and prefix |
||
| 22 | is bob, this returns a string of form "bob.foo". This assumes '.' is the PREFIX_SEPARATOR. |
||
| 23 | """ |
||
| 24 | |||
| 25 | def __init__(self, name, prefix=''): |
||
| 26 | self._prefix = prefix |
||
| 27 | self._name = name |
||
| 28 | self.ref = ('%s%s%s' % (self._prefix, PREFIX_SEPARATOR, self._name) |
||
| 29 | if self._prefix else self._name) |
||
| 30 | |||
| 31 | def __str__(self): |
||
| 32 | return self.ref |
||
| 33 |