struct TandaCLI::Commands::TimeWorked::Week

Included Modules

Defined in:

tanda_cli/commands/time_worked/week.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(*, __kebab_args args : Array(String), __kebab_parent_path parent_path : Array(String) = [] of String) #

[View source]

Class Method Detail

def self.__kebab_route_error(error : Kebab::Errors, stderr : IO) : Bool #

[View source]
def self.__kebab_schema(parent_path : Array(String)) : Kebab::Schema::Command #

[View source]
def self.on_parse_error(error : Kebab::Errors, stderr : IO) : Bool #

Override this on a command to customise how its parse errors are rendered when invoked through self.run. Return true to suppress kebab's default rendering, false to fall through to it.


[View source]
def self.parse(args : Array(String), parent_path : Array(String) = [] of String) : self | Kebab::Help | Kebab::Errors #

Parses args into either an instance of self, a Kebab::Help (if the user asked for help), or one of the Kebab::Errors variants. Never raises.


[View source]
def self.run(args : Array(String), *forward_args, stdout : IO = STDOUT, stderr : IO = STDERR, **forward_kwargs) : Bool #

Parses args and dispatches: calls instance.run(*forward_args, **forward_kwargs) on success, writes help to stdout, writes errors to stderr. Returns true on success or help, false on error. Define self.on_parse_error on a command to customise how errors for that command are rendered.


[View source]
def self.schema(parent_path : Array(String) = [] of String) : Kebab::Schema::Command #

Returns the command and its whole subtree as an immutable Kebab::Schema::Command, derived at compile time. Pure and total, never raises. parent_path prefixes the command path (used when a parent forwards its path down to a child).


[View source]

Instance Method Detail

def display? : Bool #

[View source]
def offset : Int32 | Nil #

[View source]
def run(context : Context) : Nil #

[View source]