Class: Polytrix::Command::List

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

Constant Summary

Constants included from Reporters

Reporters::ASSETS_DIR, Reporters::GENERATORS_DIR, Reporters::RESOURCES_DIR

Instance Method Summary collapse

Methods included from Reporters

reporter

Methods inherited from Base

#initialize

Methods included from Util::FileSystem

#find_file, #relativize

Methods included from Util::String

included

Methods included from Util::String::ClassMethods

#ansi2html, #escape_html, #highlight, #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



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/polytrix/command/list.rb', line 7

def call
  setup
  @reporter = Polytrix::Reporters.reporter(options[:format], shell)
  tests = parse_subcommand(args.pop)

  table = [header_row]
  table += tests.map do | challenge |
    row(challenge)
  end
  print_table(table)
end