class
AmberCLI::Commands::RoutesCommand
- AmberCLI::Commands::RoutesCommand
- AmberCLI::Core::BaseCommand
- Reference
- Object
Defined in:
amber_cli/commands/routes.crConstant Summary
-
ACTION_MAPPING =
{"get" => ["index", "show", "new", "edit"], "post" => ["create"], "patch" => ["update"], "put" => ["update"], "delete" => ["destroy"]} -
LABELS =
["Verb", "Controller", "Action", "Pipeline", "Scope", "URI Pattern"] -
PIPE_SCOPE_REGEX =
/(routes)\s+\:(\w+)(?:,\s+\"([^\"]+)\")?/ -
RESOURCE_ROUTE_REGEX =
/(\w+)\s+\"([^\"]+)\",\s*([\w:]+)(?:,\s*(\w+)\:\s*\[([^\]]+)\])?/ -
VERB_ROUTE_REGEX =
/(\w+)\s+\"([^\"]+)\",\s*([\w:]+),\s*:(\w+)/ -
WEBSOCKET_ROUTE_REGEX =
/(websocket)\s+\"([^\"]+)\",\s*([\w:]+)/
Instance Method Summary
- #build_route(verb, uri_pattern, controller, action, pipeline, scope = "")
- #current_pipe : String | Nil
- #current_pipe=(current_pipe : String | Nil)
- #current_scope : String | Nil
- #current_scope=(current_scope : String | Nil)
- #execute
- #help_description : String
- #json_output : Bool
- #routes : Array(Hash(String, String))
- #setup_command_options