소스 검색

Merge branch 'grtfou-master'

Sakis Kasampalis 11 년 전
부모
커밋
6c6530318e
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      abstract_factory.py

+ 6 - 0
abstract_factory.py

@@ -52,12 +52,18 @@ class DogFactory:
     def get_pet(self):
         return Dog()
 
+    def get_food(self):
+        return "dog food"
+
 
 class CatFactory:
 
     def get_pet(self):
         return Cat()
 
+    def get_food(self):
+        return "cat food"
+
 # Create the proper family
 def get_factory():
     """Let's be dynamic!"""