Method: Hanami::Config#root

Defined in:
lib/hanami/config.rb

#rootPathname

Sets the root for the app or slice.

For the app, this defaults to ‘Dir.pwd`. For slices detected in `slices/` `config/slices/`, this defaults to `slices//`.

Accepts a string path and will return a ‘Pathname`.

Returns:

  • (Pathname)

Since:

  • 2.0.0


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

setting :root, constructor: ->(path) { Pathname(path) if path }