struct
Tabular::Tablet
- Tabular::Tablet
- Struct
- Value
- Object
Overview
Represents a parameter whose name and aliases may be suggested and matched during tab completion.
Defined in:
tabular/tablet.crConstant Summary
-
NONE =
Tablet.new(:none)
-
Basically, [
Tablet?
][Tabular::Tablet] minus the baggage.
Constructors
-
.new(kind : Kind, name : String = "", aliases = [] of String, help = "", directives : Directable | Nil = nil, delimiters = Tabular.delimiters)
Create a new [
Tablet
][Tabular::Tablet].
Instance Method Summary
-
#aliases : Set(String)
A list of additional names the [
Tablet
][Tabular::Tablet] will suggest/match. -
#candidate(arg : String, & : String -> )
Yield suggestions for any names that contain arg.
-
#directives : Tabular::Directive
Additional directives the [
Tablet
][Tabular::Tablet] will send to the shell if suggested. -
#form?
Return
true
if a nested form exists. -
#help : String
The description of the parameter the [
Tablet
][Tabular::Tablet] represents. -
#kind : Tabular::Kind
The representation of the [
Tablet
][Tabular::Tablet]. -
#match!(arg : String)
Returns
self
if arg is an exact match of any names. -
#match?(arg : String) : Bool
Return
true
if arg is an exact match of any names. -
#name : String
The name of the parameter the [
Tablet
][Tabular::Tablet] represents. - #next(&)
-
#to_s(io : IO)
Same as
#inspect(io)
.
Constructor Detail
Create a new [Tablet
][Tabular::Tablet].
- kind: See [
#kind
][Tabular::Tablet#kind]. - name: See [
#name
][Tabular::Tablet#name]. - aliases: See [
#aliases
][Tabular::Tablet#aliases]. - help: See [
#help
][Tabular::Tablet#help]. - directives: See [
#directives
][Tabular::Tablet#directives]. - delimiters: Ad hoc delimiters that will override [
Tabular.delimiters
][Tabular.delimiters].
Instance Method Detail
A list of additional names the [Tablet
][Tabular::Tablet] will suggest/match.
Additional directives the [Tablet
][Tabular::Tablet] will send to the shell if suggested.
Returns self
if arg is an exact match of any names. Otherwise, raise [Error::Match
][Tabular::Error::Match].