abstract class TandaCLI::Commands::Base
- TandaCLI::Commands::Base
- Cling::Command
- Reference
- Object
Included Modules
Direct Known Subclasses
- TandaCLI::Commands::Balance
- TandaCLI::Commands::ClockIn
- TandaCLI::Commands::ClockIn::Break
- TandaCLI::Commands::ClockIn::Break::Finish
- TandaCLI::Commands::ClockIn::Break::Start
- TandaCLI::Commands::ClockIn::Display
- TandaCLI::Commands::ClockIn::Finish
- TandaCLI::Commands::ClockIn::Photo
- TandaCLI::Commands::ClockIn::Photo::Clear
- TandaCLI::Commands::ClockIn::Photo::List
- TandaCLI::Commands::ClockIn::Photo::Set
- TandaCLI::Commands::ClockIn::Photo::View
- TandaCLI::Commands::ClockIn::Start
- TandaCLI::Commands::ClockIn::Status
- TandaCLI::Commands::CurrentUser
- TandaCLI::Commands::CurrentUser::Display
- TandaCLI::Commands::CurrentUser::List
- TandaCLI::Commands::CurrentUser::Set
- TandaCLI::Commands::Main
- TandaCLI::Commands::Me
- TandaCLI::Commands::Mode
- TandaCLI::Commands::Mode::Custom
- TandaCLI::Commands::Mode::Display
- TandaCLI::Commands::Mode::Production
- TandaCLI::Commands::Mode::Staging
- TandaCLI::Commands::PersonalDetails
- TandaCLI::Commands::RefetchToken
- TandaCLI::Commands::RefetchUsers
- TandaCLI::Commands::RegularHours
- TandaCLI::Commands::RegularHours::Determine
- TandaCLI::Commands::RegularHours::Display
- TandaCLI::Commands::StartOfWeek
- TandaCLI::Commands::StartOfWeek::Display
- TandaCLI::Commands::StartOfWeek::Set
- TandaCLI::Commands::TimeWorked
- TandaCLI::Commands::TimeWorked::Today
- TandaCLI::Commands::TimeWorked::Week
- TandaCLI::Commands::TimeZone
- TandaCLI::Commands::TimeZone::Display
- TandaCLI::Commands::TimeZone::Set
Defined in:
tanda_cli/commands/base.crClass Method Summary
Instance Method Summary
-
#before_run(arguments : Cling::Arguments, options : Cling::Options) : Bool
override this to extend
#pre_run
behaviour -
#on_error(ex : Exception)
A hook method for when the command raises an exception during execution
-
#on_invalid_option(message : String)
A hook method for when the command receives an invalid option, for example, a value given to an option that takes no arguments
-
#on_missing_arguments(arguments : Array(String))
A hook method for when the command receives missing arguments during execution
-
#on_missing_options(options : Array(String))
A hook method for when the command receives missing options that are required during execution
-
#on_unknown_arguments(arguments : Array(String))
A hook method for when the command receives unknown arguments during execution
-
#on_unknown_options(options : Array(String))
A hook method for when the command receives unknown options during execution
-
#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.
- #run_(arguments : Cling::Arguments, options : Cling::Options)
-
#setup : Nil
An abstract method that should define information about the command such as the name, aliases, arguments, options, etc.
- #setup_
Instance methods inherited from module TandaCLI::Commands::RequiredScopes
build_missing_scopes_error_message(scopes : Array(Scopes::OptionalScope)) : String
build_missing_scopes_error_message,
handle_required_scopes!
handle_required_scopes!,
scope_message(scope_strings : Array(String)) : String
scope_message
Class Method Detail
Instance Method Detail
override this to extend #pre_run
behaviour
A hook method for when the command raises an exception during execution
A hook method for when the command receives an invalid option, for example, a value given to an option that takes no arguments
A hook method for when the command receives missing arguments during execution
A hook method for when the command receives missing options that are required during execution
A hook method for when the command receives unknown arguments during execution
A hook method for when the command receives unknown options during execution
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.