Class: Controls::RouteControl::ListAction
- Inherits:
-
Action
- Object
- Whiskey::Server::Action
- Action
- Controls::RouteControl::ListAction
- Includes:
- Controls::RouteControl
- Defined in:
- lib/whiskey/command/templates/lib/controls/router_control.rb
Instance Method Summary collapse
-
#initialize(parameters) ⇒ ListAction
constructor
A new instance of ListAction.
- #to_hash ⇒ Object
Methods included from Whiskey::Server::Control
Methods inherited from Whiskey::Server::Action
Constructor Details
#initialize(parameters) ⇒ ListAction
Returns a new instance of ListAction.
8 9 10 |
# File 'lib/whiskey/command/templates/lib/controls/router_control.rb', line 8 def initialize(parameters) @routes = Controls.controls.map(&:to_route) end |
Instance Method Details
#to_hash ⇒ Object
12 13 14 15 16 |
# File 'lib/whiskey/command/templates/lib/controls/router_control.rb', line 12 def to_hash { routes: @routes } end |