struct

Shoo::Commands::Auth

Inherits Kebab::Parseable < Struct < Value < Object

Constructors

new(*, __kebab_args args : Array(String), __kebab_parent_path parent_path : Array(String) = [] of String, __kebab_inherited_globals inherited_globals : Array(Kebab::Schema::Option) = [] of ::Kebab::Schema::Option)
Source

Class methods

__kebab_route_error(error : Kebab::Errors, stderr : IO) : Bool
Source
__kebab_schema(parent_path : Array(String), inherited_globals : Array(Kebab::Schema::Option) = [] of ::Kebab::Schema::Option) : Kebab::Schema::Command
Source
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.

Source
parse(args : Array(String) = ARGV) : self | Kebab::Help | Kebab::Errors

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

Source
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.

Source
schema

Returns the command and its whole subtree as an immutable Kebab::Schema::Command, derived at compile time.

Source

Instance methods

command
Source

Nested types