Add Builder for shields

This commit is contained in:
Lucàs
2024-01-04 15:43:18 +01:00
parent efbf7fb7cc
commit b2c6d4c070
13 changed files with 466 additions and 441 deletions
+3 -4
View File
@@ -2,11 +2,10 @@ from src.model.social import Social
class SocialList:
socials: list[Social]
def __init__(self, socials: list):
self.socials = [Social(social.get("name"), social.get("url"), social.get("img")) for social in socials]
self.socials = [Social(social.get("name"), social.get("url")) for social in socials]
def __str__(self) -> str:
return "\n".join([str(social) for social in self.socials])
def __repr__(self) -> str:
return "\n".join([str(social) for social in self.socials])