Add `Symbol.tokens()` for grabbing separate strs

fqsns
Tyler Goodlet 2022-03-24 13:25:48 -04:00
parent 7bd5b42f9e
commit a6e32e7530
1 changed files with 5 additions and 3 deletions

View File

@ -214,13 +214,15 @@ class Symbol(BaseModel):
self.key, self.key,
) )
def front_fqsn(self) -> str: def tokens(self) -> tuple[str]:
broker, key = self.front_feed() broker, key = self.front_feed()
if self.suffix: if self.suffix:
tokens = (key, self.suffix, broker) return (key, self.suffix, broker)
else: else:
tokens = (key, broker) return (key, broker)
def front_fqsn(self) -> str:
tokens = self.tokens()
fqsn = '.'.join(tokens) fqsn = '.'.join(tokens)
return fqsn return fqsn