Class: Tomo::Commands::Tasks
Instance Method Summary
collapse
included
included
after_parse, arg, option, parse, parser
enabled?
Instance Method Details
#banner ⇒ Object
13
14
15
16
17
18
19
20
21
|
# File 'lib/tomo/commands/tasks.rb', line 13
def banner
<<~BANNER
Usage: #{green('tomo tasks')}
List all tomo tasks (i.e. those that can be used with #{blue('tomo run')}).
Available tasks are those defined by plugins loaded in #{DEFAULT_CONFIG_PATH}.
BANNER
end
|
#call(options) ⇒ Object
23
24
25
26
27
28
29
30
31
|
# File 'lib/tomo/commands/tasks.rb', line 23
def call(options)
runtime = configure_runtime(options, strict: false)
tasks = runtime.tasks
groups = tasks.group_by { |task| task[/^([^:]+):/, 1].to_s }
groups.keys.sort.each do |group|
logger.info(groups[group].sort.join("\n"))
end
end
|
#summary ⇒ Object
9
10
11
|
# File 'lib/tomo/commands/tasks.rb', line 9
def summary
"List all tasks that can be used with the #{yellow('run')} command"
end
|