Method: Hanami::SliceName#name

Defined in:
lib/hanami/slice_name.rb

#nameString Also known as: path, to_s

Returns the name of the slice as a downcased, underscored string.

This is considered the canonical name of the slice.

Examples:

slice_name.name # => "main"

Returns:

  • (String)

    the slice name

Since:

  • 2.0.0



42
43
44
# File 'lib/hanami/slice_name.rb', line 42

def name
  inflector.underscore(namespace_name)
end