浏览代码

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!"""