Method: Hanami::SliceName#namespace_const

Defined in:
lib/hanami/slice_name.rb

#namespace_constModule Also known as: namespace

Returns the constant for the slice’s module namespace.

Examples:

slice_name.namespace_const # => Main

Returns:

  • (Module)

    the namespace module constant

Since:

  • 2.0.0



72
73
74
# File 'lib/hanami/slice_name.rb', line 72

def namespace_const
  inflector.constantize(namespace_name)
end