Class: FocusedController::Route
- Inherits:
-
Object
- Object
- 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.
5 6 7 |
# File 'lib/focused_controller/route.rb', line 5 def initialize(name) @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly) Also known as: to_s
Returns the value of attribute name.
3 4 5 |
# File 'lib/focused_controller/route.rb', line 3 def name @name end |
Instance Method Details
#call(env) ⇒ Object
9 10 11 |
# File 'lib/focused_controller/route.rb', line 9 def call(env) name.constantize.call(env) end |