feat: add support for tracking inherited filesystem config subclasses
This commit is contained in:
parent
06e3d1895c
commit
f383694870
1 changed files with 9 additions and 0 deletions
|
@ -15,6 +15,15 @@ module GX::Models
|
||||||
abstract class AbstractFilesystemConfig
|
abstract class AbstractFilesystemConfig
|
||||||
include YAML::Serializable
|
include YAML::Serializable
|
||||||
# include YAML::Serializable::Strict
|
# include YAML::Serializable::Strict
|
||||||
|
@@subs = [] of AbstractFilesystemConfig.class
|
||||||
|
|
||||||
|
macro inherited
|
||||||
|
@@subs << {{@type.name.id}}
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.subs
|
||||||
|
@@subs
|
||||||
|
end
|
||||||
|
|
||||||
use_yaml_discriminator "type", {
|
use_yaml_discriminator "type", {
|
||||||
gocryptfs: GoCryptFSConfig,
|
gocryptfs: GoCryptFSConfig,
|
||||||
|
|
Loading…
Reference in a new issue