Class: Controls::RouteControl::ListAction

Inherits:
Action show all
Includes:
Controls::RouteControl
Defined in:
lib/whiskey/command/templates/lib/controls/router_control.rb

Instance Method Summary collapse

Methods included from Whiskey::Server::Control

included

Methods inherited from Whiskey::Server::Action

to_verb

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_hashObject



12
13
14
15
16
# File 'lib/whiskey/command/templates/lib/controls/router_control.rb', line 12

def to_hash
  {
    routes: @routes
  }
end