Class: Passages::MountRoute

Inherits:
ActionDispatch::Routing::RouteWrapper
  • Object
show all
Defined in:
lib/passages/mount_route.rb

Overview

Special DelegateClass of ActionDispatch’s RouteWrapper for

an Engine's mount route. i.e. /passages for this Engine

Instance Method Summary collapse

Constructor Details

#initialize(route, app) ⇒ MountRoute

Returns a new instance of MountRoute.



5
6
7
8
# File 'lib/passages/mount_route.rb', line 5

def initialize(route, app)
  @app = app
  super(ActionDispatch::Routing::RouteWrapper.new(route))
end

Instance Method Details

#engine_nameObject



10
11
12
# File 'lib/passages/mount_route.rb', line 10

def engine_name
  @app.name
end