class

Marten::Apps::Config

Inherits Marten::Apps::Association < Reference < Object

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).

Constructors

Class methods

label(label : String | Symbol)

Allows to define the lable of the application config.

Source
label

Returns the label of the application config.

Source
validate_label(label : String | Symbol)

Validates the label of the application config.

Raises Marten::Apps::Errors::InvalidAppConfig if the label is invalid.

Source

Instance methods

==(other : self)

Returns true if the other app config corresponds to the current app config.

Source
assets_finder

Returns the assets finder of the application.

If the application doesn't have a dedicated assets directory, nil is returned.

Source
label(*args, **options)
Source
label(*args, **options, &)
Source
main?

Returns false in order to indicate that this is not the main application.

Source
migrations_path

Returns the migrations path for the application.

Source
models
Source
register_model(model : DB::Model.class)

Associates a model to the current app config.

Source
setup

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.

Source
templates_loader

Returns the templates loader of the application.

If the application doesn't have a dedicated templates directory, nil is returned.

Source
translations_loader

Returns the translations loader of the application.

If the application doesn't define translations in a dedicated directory, nil is returned.

Source