implemented strategy pattern

This commit is contained in:
tylerlaberge
2016-08-06 18:03:05 -04:00
parent c643902979
commit 4bc61b0306
2 changed files with 83 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
from abc import ABCMeta, abstractmethod
class Strategy(object):
"""
An abstract Strategy class.
All strategies should inherit this class.
"""
__metaclass__ = ABCMeta
@abstractmethod
def __call__(self, *args, **kwargs):
"""
Abstract method that must be overridden.
The overridden method should execute the classes strategy.
"""
pass