Skip to content

Commit f434c0d

Browse files
authored
Creational Pattern (1)
Why i did it? I had to create a creational pattern and in this case i found the Factory method to be the one. where i created an interface for creating objects in a super class, but allowing subclasses to alter the type of objects that will be created. How i did it? I created a new interface class in #init for location to implement creational pattern and the interface for location class is missing so i just added an interface class and serialized the location into a dict.
1 parent c3d8c6e commit f434c0d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

app/location/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,3 +132,4 @@ def serialize(self, timelines=False):
132132

133133
# Return the serialized location.
134134
return serialized
135+

0 commit comments

Comments
 (0)