Class: Polytrix::Command::List

Inherits:
Base
  • Object
show all
Defined in:
lib/polytrix/command/list.rb

Constant Summary

Constants inherited from Base

Base::SUPPORTED_EXTENSIONS

Instance Method Summary collapse

Methods inherited from Base

#initialize

Methods included from Polytrix::Core::FileSystemHelper

#find_file, #recursive_parent_search

Methods included from StringHelpers

included

Methods included from StringHelpers::ClassMethods

#slugify

Methods included from DefaultLogger

included

Methods included from DefaultLogger::ClassMethods

#logger

Constructor Details

This class inherits a constructor from Polytrix::Command::Base

Instance Method Details

#callObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/polytrix/command/list.rb', line 4

def call
  # Logging.mdc['command'] = 'list'

  setup
  tests = parse_subcommand(args.first)

  table = [
    [
      colorize('Suite', :green), colorize('Scenario', :green),
      colorize('Implementor', :green), colorize('Status', :green)
    ]
  ]
  table += tests.map do | challenge |
    [
      color_pad(challenge.suite),
      color_pad(challenge.name),
      color_pad(challenge.implementor.name),
      format_last_action(challenge)
    ]
  end
  shell.print_table table
end