Class: Psychic::Runner::CLI::List
- Defined in:
- lib/psychic/runner/cli.rb
Constant Summary
Constants inherited from CLI
Instance Method Summary collapse
Methods inherited from CLI
Instance Method Details
#samples ⇒ Object
69 70 71 72 73 74 |
# File 'lib/psychic/runner/cli.rb', line 69 def samples samples = runner.known_samples.map do |sample| [set_color(sample.name, :bold), sample.source_file] end print_table samples end |
#tasks ⇒ Object
79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/psychic/runner/cli.rb', line 79 def tasks runner.known_tasks.map do |task| task_id = set_color(task, :bold) if [:verbose] details = runner.task_for(task) details = details.call if details.respond_to? :call details = "\n#{details}".lines.join(' ') if details.lines.size > 1 say "#{task_id}: #{details}" else say task_id end end end |