Class: RubynCode::CLI::Commands::Spawn
- Inherits:
-
Base
- Object
- Base
- RubynCode::CLI::Commands::Spawn
show all
- Defined in:
- lib/rubyn_code/cli/commands/spawn.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
aliases, all_names, hidden?
Class Method Details
.command_name ⇒ Object
7
|
# File 'lib/rubyn_code/cli/commands/spawn.rb', line 7
def self.command_name = '/spawn'
|
.description ⇒ Object
8
|
# File 'lib/rubyn_code/cli/commands/spawn.rb', line 8
def self.description = 'Spawn a teammate agent (/spawn <name> [role])'
|
Instance Method Details
#execute(args, ctx) ⇒ Object
10
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/rubyn_code/cli/commands/spawn.rb', line 10
def execute(args, ctx)
name = args[0]
unless name
ctx.renderer.error('Usage: /spawn <name> [role]')
return
end
role = args[1] || 'coder'
{ action: :spawn_teammate, name: name, role: role }
end
|