class Run::CommandGroup
- Run::CommandGroup
- Reference
- Object
Defined in:
run/command_group.crConstructors
-
.new(name : Symbol, **attrs)
Initializes a command group with context attributes.
-
.new(**attrs)
Initializes a command group with context attributes.
-
.new(name : Symbol, **attrs, &)
Initializes a command group with context attributes and yield a block with self.
-
.new(**attrs, &)
Initializes a command group with context attributes and yield a block with self.
Instance Method Summary
-
#<<(command : Command)
Appends a single command.
-
#<<(group : CommandGroup)
Appends a command group.
-
#[](*args)
Delegated to #[] of the result of
#commands
. -
#[]?(*args)
Delegated to #[]? of the result of
#commands
. -
#children : Array(Run::Command | Run::CommandGroup)
Returns all the commands and the command groups appended to this group.
-
#command(*nameless, **named)
Appends and returns a new single command.
-
#command_groups : Array(Run::CommandGroup)
Returns all the command groups appended to this group.
-
#commands : Array(Run::Command)
Returns all the commands appended to this group.
-
#context : Context
Returns this context.
-
#group(name : Symbol, **named)
Appends and returns a new command group.
-
#group(**named)
Appends and returns a new command group.
-
#group(name : Symbol, &block : CommandGroup -> _)
Appends and returns a new command group and yield a block with the group.
-
#group(child : CommandGroup, &block : CommandGroup -> _)
Appends and returns the specified group and yield a block with the group.
-
#group(name : Symbol, **named, &block : CommandGroup -> _)
Appends and returns a new command group and yield a block with the group.
-
#group(**named, &block : CommandGroup -> _)
Appends and returns a new command group and yield a block with the group.
-
#parent=(parent : CommandGroup)
Sets a parent group.
-
#parent? : CommandGroup | Nil
Returns this parent group.
-
#run(**attrs)
Runs all commands and command groups under this group.
Constructor Detail
Initializes a command group with context attributes.
For more information about the arguments, see Context#set
.
Initializes a command group with context attributes.
For more information about the arguments, see Context#set
.
Initializes a command group with context attributes and yield a block with self.
For more information about the arguments, see Context#set
.
Initializes a command group with context attributes and yield a block with self.
For more information about the arguments, see Context#set
.
Instance Method Detail
Appends a single command.
It sets self to the appended command as the parent.
Appends a command group.
It sets self to the appended group as the parent.
Returns all the commands and the command groups appended to this group.
Appends and returns a new single command.
It initializes the command's context attributes with the arguments.
For more information about the context attributes, see Context#set
.
Returns all the command groups appended to this group.
Appends and returns a new command group.
It initializes the new group's context attributes with the arguments.
For more information about the context attributes, see Context#set
.
Appends and returns a new command group.
It initializes the new group's context attributes with the arguments.
For more information about the context attributes, see Context#set
.
Appends and returns a new command group and yield a block with the group.
It initializes the new group's context attributes with the arguments.
For more information about the context attributes, see Context#set
.
Appends and returns the specified group and yield a block with the group.
It initializes the new group's context attributes with the arguments.
For more information about the context attributes, see Context#set
.
Appends and returns a new command group and yield a block with the group.
It initializes the new group's context attributes with the arguments.
For more information about the context attributes, see Context#set
.
Appends and returns a new command group and yield a block with the group.
It initializes the new group's context attributes with the arguments.
For more information about the context attributes, see Context#set
.