class
Lucid::REPLCommand
- Lucid::REPLCommand
- Lucid::Command
- Cling::Command
- Reference
- Object
Defined in:
cli/repl.crConstant Summary
-
WORD_DELIMITERS =
[' ', '\n', '\t', '+', '-', '*', '/', ',', ';', '@', '&', '%', '<', '>', '^', '\\', '[', ']', '(', ')', '{', '}', '|', '.', '~']
Instance Method Summary
-
#pre_run(arguments : Cling::Arguments, options : Cling::Options) : Nil
A hook method to run once the command/subcommands, arguments and options have been parsed.
-
#run(arguments : Cling::Arguments, options : Cling::Options) : Nil
The main point of execution for the command, where arguments and options can be accessed.
-
#setup : Nil
An abstract method that should define information about the command such as the name, aliases, arguments, options, etc.
Instance methods inherited from class Lucid::Command
help_template : String
help_template,
on_error(ex : Exception) : Nil
on_error,
on_invalid_option(message : String) : Nil
on_invalid_option,
on_unknown_arguments(args : Array(String)) : Nil
on_unknown_arguments,
on_unknown_options(options : Array(String)) : Nil
on_unknown_options,
pre_run(arguments : Cling::Arguments, options : Cling::Options) : Nil
pre_run
Constructor methods inherited from class Lucid::Command
new
new
Instance Method Detail
A hook method to run once the command/subcommands, arguments and options have been parsed.
This has access to the parsed arguments and options from the command line. This is useful if
you want to implement checks for specific flags outside of the main #run
method, such as
-v
/--version
flags or -h
/--help
flags.
The main point of execution for the command, where arguments and options can be accessed.
An abstract method that should define information about the command such as the name, aliases, arguments, options, etc. The command name is required for all commands, all other values are optional including the help message.