Method: Hanami::Config#slices

Defined in:
lib/hanami/config.rb

#slicesArray<String>?

Sets the slices to load when the app is preared or booted.

Defaults to ‘nil`, which will load all slices. Set this to an array of slice names to load only those slices.

This attribute is also populated from the ‘HANAMI_SLICES` environment variable.

Examples:

config.slices = ["admin", "search"]
ENV["HANAMI_SLICES"] # => "admin,search"
config.slices # => ["admin", "search"]

Returns:

  • (Array<String>, nil)

Since:

  • 2.0.0

[View source]

80
# File 'lib/hanami/config.rb', line 80

setting :slices