feat: add scaffold for operations (command design pattern)
This commit is contained in:
parent
0eda2a1003
commit
44bb2763b0
8 changed files with 72 additions and 0 deletions
|
@ -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
2
src/operations.cr
Normal file
|
@ -0,0 +1,2 @@
|
|||
|
||||
require "./operations/*"
|
8
src/operations/abstract_command.cr
Normal file
8
src/operations/abstract_command.cr
Normal file
|
@ -0,0 +1,8 @@
|
|||
|
||||
module GX
|
||||
module Operations
|
||||
abstract class AbstractCommand
|
||||
abstract def execute()
|
||||
end
|
||||
end
|
||||
end
|
12
src/operations/filesystem_create_command.cr
Normal file
12
src/operations/filesystem_create_command.cr
Normal file
|
@ -0,0 +1,12 @@
|
|||
|
||||
require "./abstract_command"
|
||||
|
||||
module GX
|
||||
module Operations
|
||||
class FilesystemCreateCommand < AbstractCommand
|
||||
def execute()
|
||||
raise "Not Implemented"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
12
src/operations/filesystem_delete_command.cr
Normal file
12
src/operations/filesystem_delete_command.cr
Normal file
|
@ -0,0 +1,12 @@
|
|||
|
||||
require "./abstract_command"
|
||||
|
||||
module GX
|
||||
module Operations
|
||||
class FilesystemDeleteCommand < AbstractCommand
|
||||
def execute()
|
||||
raise "Not Implemented"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
12
src/operations/filesystem_edit_command.cr
Normal file
12
src/operations/filesystem_edit_command.cr
Normal file
|
@ -0,0 +1,12 @@
|
|||
|
||||
require "./abstract_command"
|
||||
|
||||
module GX
|
||||
module Operations
|
||||
class FilesystemEditCommand < AbstractCommand
|
||||
def execute()
|
||||
raise "Not Implemented"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
12
src/operations/filesystem_mount_command.cr
Normal file
12
src/operations/filesystem_mount_command.cr
Normal file
|
@ -0,0 +1,12 @@
|
|||
|
||||
require "./abstract_command"
|
||||
|
||||
module GX
|
||||
module Operations
|
||||
class FilesystemMountCommand < AbstractCommand
|
||||
def execute()
|
||||
raise "Not Implemented"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
12
src/operations/filesystem_umount_command.cr
Normal file
12
src/operations/filesystem_umount_command.cr
Normal file
|
@ -0,0 +1,12 @@
|
|||
|
||||
require "./abstract_command"
|
||||
|
||||
module GX
|
||||
module Operations
|
||||
class FilesystemUmountCommand < AbstractCommand
|
||||
def execute()
|
||||
raise "Not Implemented"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue