WIP Prepare version_repository.py
This commit is contained in:
parent
38c7aa97ca
commit
7eb7a2647a
1 changed files with 17 additions and 0 deletions
17
version_repository.py
Normal file
17
version_repository.py
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
from file_handlers import FileHandler
|
||||||
|
|
||||||
|
class VersionRepository():
|
||||||
|
|
||||||
|
def __init__(self, file):
|
||||||
|
self.file = file
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def load_file(cls, file):
|
||||||
|
file_handler = FileHandler.from_file_path(file)
|
||||||
|
version, is_snapshot = file_handler.parse()
|
||||||
|
inst = cls(version, is_snapshot)
|
||||||
|
inst.file_handler = file_handler
|
||||||
|
|
||||||
|
return inst
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue