class AmberCLI::Commands::RoutesCommand

Defined in:

amber_cli/commands/routes.cr

Constant 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

Instance methods inherited from class AmberCLI::Core::BaseCommand

execute execute, help_description : String help_description, option_parser : OptionParser option_parser, parse_and_execute(args : Array(String)) parse_and_execute, parsed_options : Hash(String, String | Bool | Array(String)) parsed_options, remaining_arguments : Array(String) remaining_arguments, setup_command_options setup_command_options

Constructor methods inherited from class AmberCLI::Core::BaseCommand

new(command_name : String) new

Instance Method Detail

def build_route(verb, uri_pattern, controller, action, pipeline, scope = "") #

[View source]
def current_pipe : String | Nil #

[View source]
def current_pipe=(current_pipe : String | Nil) #

[View source]
def current_scope : String | Nil #

[View source]
def current_scope=(current_scope : String | Nil) #

[View source]
def execute #

[View source]
def help_description : String #

[View source]
def json_output : Bool #

[View source]
def routes : Array(Hash(String, String)) #

[View source]
def setup_command_options #

[View source]