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,
)
def front_fqsn(self) -> str:
def tokens(self) -> tuple[str]:
broker, key = self.front_feed()
if self.suffix:
tokens = (key, self.suffix, broker)
return (key, self.suffix, broker)
else:
tokens = (key, broker)
return (key, broker)
def front_fqsn(self) -> str:
tokens = self.tokens()
fqsn = '.'.join(tokens)
return fqsn