Class: FocusedController::Route
- Inherits:
-
ActionDispatch::Routing::RouteSet::Dispatcher
- Object
- ActionDispatch::Routing::RouteSet::Dispatcher
- FocusedController::Route
- Defined in:
- lib/focused_controller/route.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
(also: #to_s)
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(name) ⇒ Route
constructor
A new instance of Route.
Constructor Details
#initialize(name) ⇒ Route
Returns a new instance of Route.
7 8 9 |
# File 'lib/focused_controller/route.rb', line 7 def initialize(name) @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly) Also known as: to_s
Returns the value of attribute name.
5 6 7 |
# File 'lib/focused_controller/route.rb', line 5 def name @name end |
Instance Method Details
#call(env) ⇒ Object
11 12 13 |
# File 'lib/focused_controller/route.rb', line 11 def call(env) name.constantize.call(env) end |