Class: Mortymer::Rails::Routes
- Inherits:
-
Object
- Object
- Mortymer::Rails::Routes
- Defined in:
- lib/mortymer/rails/routes.rb
Overview
This module is in charge of making each registered Morty Endpoint routeable through rails
Instance Method Summary collapse
-
#initialize(drawer) ⇒ Routes
constructor
A new instance of Routes.
- #mount_controllers ⇒ Object
- #mount_morty_endpoints ⇒ Object
Constructor Details
#initialize(drawer) ⇒ Routes
Returns a new instance of Routes.
8 9 10 |
# File 'lib/mortymer/rails/routes.rb', line 8 def initialize(drawer) @drawer = drawer end |
Instance Method Details
#mount_controllers ⇒ Object
18 19 20 21 22 |
# File 'lib/mortymer/rails/routes.rb', line 18 def mount_controllers Mortymer::EndpointRegistry.registry.each do |endpoint| mount_controller(endpoint) end end |
#mount_morty_endpoints ⇒ Object
12 13 14 15 16 |
# File 'lib/mortymer/rails/routes.rb', line 12 def mount_morty_endpoints Mortymer::EndpointRegistry.registry.each do |endpoint| mount_endpoint(endpoint) end end |