abstract class Comandante::ConfigSingleton
inherits Reference
Create your config class from this
Example
class Config < ConfigSingleton
config_type(MyConfig) do
name : String = "foo"
age : Int32 = 150
end
...
end
if you intend to use nested types define one or more sub_config_type
sub_config_type(URLConfig) do
scheme : String = "https"
no_proxy : Bool = false
end
config_type(ServerConfig) do
urls : Hash(String, URLConfig) = Hash(String, URLConfig).new
end
Included modules
Comandante
Comandante::Macros
Class methods
Macros
config_type
defines a config type and accessors of its properties on the singleton class as well as on @config, also defines a load_config