Module: Hanami::Helpers::RoutingHelper
- Defined in:
- lib/hanami/helpers/routing_helper.rb
Overview
Routing helper for full stack Hanami web applications.
For a given application called Web::Application, at runtime Hanami creates a routes factory called Web::Routes.
By including this module in a view, it makes that factory avaliable as routes.
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
41 42 43 44 45 46 47 48 49 |
# File 'lib/hanami/helpers/routing_helper.rb', line 41 def self.included(base) factory = "#{ Utils::String.new(base).namespace }::Routes" base.class_eval " def routes\n \#{ factory }\n end\n END_EVAL\nend\n", __FILE__, __LINE__ |