class Marten::CLI::Manage::Command::New

Defined in:

marten/cli/manage/command/new.cr
marten/cli/manage/command/new/context.cr
marten/cli/manage/command/new/template.cr

Class Method Summary

Macro Summary

Instance Method Summary

Instance methods inherited from class Marten::CLI::Manage::Command::Base

handle handle, on_argument(name : String | Symbol, description : String, &block : String -> ) on_argument, on_option(short_flag : String | Symbol, long_flag : String | Symbol, description : String, &block : String -> )
on_option(flag : String | Symbol, description : String, &block : String -> )
on_option
, on_option_with_arg(short_flag : String | Symbol, long_flag : String | Symbol, arg : String | Symbol, description : String, &block : String -> )
on_option_with_arg(flag : String | Symbol, arg : String | Symbol, description : String, &block : String -> )
on_option_with_arg
, print(msg, ending = "\n") print, print_error(msg) print_error, print_error_and_exit(msg, exit_code = 1) print_error_and_exit, run run, setup setup, stderr : IO stderr, stdin : IO stdin, stdout : IO stdout, style(msg, fore = nil, back = nil, mode = nil) style

Constructor methods inherited from class Marten::CLI::Manage::Command::Base

new(options : Array(String), stdin : IO = STDIN, stdout : IO = STDOUT, stderr : IO = STDERR, main_command_name : String = Marten::CLI::DEFAULT_COMMAND_NAME) new

Class methods inherited from class Marten::CLI::Manage::Command::Base

command_aliases
command_aliases(*aliases : String | Symbol)
command_aliases
, command_name(name : String | Symbol)
command_name
command_name
, help(help : String)
help
help

Class Method Detail

def self.app_templates #

[View source]
def self.project_templates #

[View source]

Macro Detail

macro template(template_path, destination_path) #

[View source]
macro templates(kind, target = "general") #

[View source]

Instance Method Detail

def run #
Description copied from class Marten::CLI::Manage::Command::Base

Runs the command.

This method should be overridden by subclasses in order to implement the execution logic of the considered command.


[View source]
def setup #
Description copied from class Marten::CLI::Manage::Command::Base

Setups the command.

This method should be overridden by subclasses in order to configure the command arguments and options through the use of the #on_argument and #on_option methods.


[View source]