Chelsea / command /command_handler.py
CineAI's picture
v0.0.1_DigItBMTH
d5436e0
raw
history blame
427 Bytes
from typing import Optional
from abc import ABC, abstractmethod
class CommandHandler(ABC):
def __init__(self, successor: Optional["CommandHandler"] = None):
self.successor = successor
def handle_command(self, command):
if self.successor:
self.successor.handle_command(command)
@abstractmethod
def execute_command(self):
"""Method of processing command execution logic"""