feat: add scaffold for operations (command design pattern)

This commit is contained in:
Glenn Y. Rolland 2023-11-21 00:26:17 +01:00
parent 9f3f3b24c1
commit 4730c77992
8 changed files with 72 additions and 0 deletions

View file

@ -8,6 +8,8 @@ require "./config"
require "./fzf"
require "./version"
require "./operations"
module GX
class Cli
Log = ::Log.for("cli")

2
src/operations.cr Normal file
View file

@ -0,0 +1,2 @@
require "./operations/*"

View file

@ -0,0 +1,8 @@
module GX
module Operations
abstract class AbstractCommand
abstract def execute()
end
end
end

View file

@ -0,0 +1,12 @@
require "./abstract_command"
module GX
module Operations
class FilesystemCreateCommand < AbstractCommand
def execute()
raise "Not Implemented"
end
end
end
end

View file

@ -0,0 +1,12 @@
require "./abstract_command"
module GX
module Operations
class FilesystemDeleteCommand < AbstractCommand
def execute()
raise "Not Implemented"
end
end
end
end

View file

@ -0,0 +1,12 @@
require "./abstract_command"
module GX
module Operations
class FilesystemEditCommand < AbstractCommand
def execute()
raise "Not Implemented"
end
end
end
end

View file

@ -0,0 +1,12 @@
require "./abstract_command"
module GX
module Operations
class FilesystemMountCommand < AbstractCommand
def execute()
raise "Not Implemented"
end
end
end
end

View file

@ -0,0 +1,12 @@
require "./abstract_command"
module GX
module Operations
class FilesystemUmountCommand < AbstractCommand
def execute()
raise "Not Implemented"
end
end
end
end