| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 295c36c commit e1afcd9
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -52,12 +52,18 @@ class DogFactory: | |||
| 52 | 52 | def get_pet(self): | |
| 53 | 53 | return Dog() | |
| 54 | 54 | ||
| 55 | + def get_food(self): | ||
| 56 | + return "dog food" | ||
| 57 | + | ||
| 55 | 58 | ||
| 56 | 59 | class CatFactory: | |
| 57 | 60 | ||
| 58 | 61 | def get_pet(self): | |
| 59 | 62 | return Cat() | |
| 60 | 63 | ||
| 64 | + def get_food(self): | ||
| 65 | + return "cat food" | ||
| 66 | + | ||
| 61 | 67 | # Create the proper family | |
| 62 | 68 | def get_factory(): | |
| 63 | 69 | """Let's be dynamic!""" | |
| Back | FazBrowse Home | New Git URL |
0 commit comments