Class: Trifle::Docs::Engine
- Inherits:
-
Rails::Engine
- Object
- Rails::Engine
- Trifle::Docs::Engine
- Defined in:
- lib/trifle/docs/engine.rb
Class Method Summary collapse
Class Method Details
.draw ⇒ Object
17 18 19 20 21 22 |
# File 'lib/trifle/docs/engine.rb', line 17 def self.draw Trifle::Docs::Engine.routes.draw do root to: 'page#show' get '*url', to: 'page#show' end end |
.mount(router, namespace:) {|configuration| ... } ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/trifle/docs/engine.rb', line 9 def self.mount(router, namespace:) configuration = Configuration.new configuration.namespace = namespace yield(configuration) router.mount self => "/#{namespace}", as: namespace, configuration: configuration end |