Method: Hanami::Slice::ClassMethods#rack_app
- Defined in:
- lib/hanami/slice.rb
permalink #rack_app ⇒ #call?
Returns a [Rack] app for the slice, or nil if no routes are defined.
The rack app will be memoized on first access.
[rack]: github.com/rack/rack
771 772 773 774 775 |
# File 'lib/hanami/slice.rb', line 771 def rack_app return unless router @rack_app ||= router.to_rack_app end |