Class: Rain::RouteEvent
- Inherits:
-
LowEvent
- Object
- LowEvent
- Rain::RouteEvent
- Defined in:
- lib/router/route_event.rb
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#route ⇒ Object
readonly
Returns the value of attribute route.
Instance Method Summary collapse
-
#initialize(route:, action: :render, params: Hash | nil) ⇒ RouteEvent
constructor
A new instance of RouteEvent.
Constructor Details
#initialize(route:, action: :render, params: Hash | nil) ⇒ RouteEvent
Returns a new instance of RouteEvent.
9 10 11 12 13 14 |
# File 'lib/router/route_event.rb', line 9 def initialize(route:, action: :render, params: Hash | nil) super(key: route.path, action:) @route = route @params = params end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
7 8 9 |
# File 'lib/router/route_event.rb', line 7 def params @params end |
#route ⇒ Object (readonly)
Returns the value of attribute route.
7 8 9 |
# File 'lib/router/route_event.rb', line 7 def route @route end |