abstract class Marten::Apps::Config
- Marten::Apps::Config
- Reference
- Object
Overview
Base application config class.
This class can be subclassed on a per-application basis in order to configure the considered application. Things like the application label can be configured this way. Moreover, app config classes are also used in order to retrieve various abstractions associated with applications (such as models for example).
Included Modules
Direct Known Subclasses
Defined in:
marten/apps/config.crConstructors
Class Method Summary
-
.label(label : String | Symbol)
Allows to define the lable of the application config.
-
.label : String
Returns the label of the application config.
Instance Method Summary
-
#==(other : self)
Returns true if the other app config corresponds to the current app config.
-
#assets_finder
Returns the assets finder of the application.
- #label(*args, **options)
- #label(*args, **options, &)
-
#migrations_path
Returns the migrations path for the application.
- #models : Array(Marten::DB::Model.class)
-
#register_model(model : DB::Model.class)
Associates a model to the current app config.
-
#setup
Allows to perform additional setup operations for a given application.
-
#templates_loader
Returns the templates loader of the application.
-
#translations_loader
Returns the translations loader of the application.
Constructor Detail
Class Method Detail
Instance Method Detail
Returns the assets finder of the application.
If the application doesn't have a dedicated assets directory, nil
is returned.
Associates a model to the current app config.
Allows to perform additional setup operations for a given application.
Each application class can override this method in order to perform additional initializations and setup operations if needed. This method will be called during the Marten setup process when all the applications are known and initialized.
Returns the templates loader of the application.
If the application doesn't have a dedicated templates directory, nil
is returned.
Returns the translations loader of the application.
If the application doesn't define translations in a dedicated directory, nil
is returned.