1
0
mirror of https://github.com/chubin/cheat.sh.git synced 2026-06-20 13:16:44 +02:00

adapter refactoring: separated superclass

This commit is contained in:
Igor Chubin
2019-02-08 18:08:51 +00:00
parent f5740599d8
commit b02a8ff4ad
+19
View File
@@ -0,0 +1,19 @@
import abc
class Adapter(object):
def __init__(self):
self._list = self._get_list()
@abc.abstractmethod
def _get_list(self):
return []
def get_list(self):
return self._list
def is_found(self, topic):
return topic in self._list
@abc.abstractmethod
def get_page(self, topic, request_options=None):
pass