Sha256: 76e0e9274ac1db746ac77e63434bed929cda16675613289502118fc7a6ee1464
Contents?: true
Size: 698 Bytes
Versions: 32
Compression:
Stored size: 698 Bytes
Contents
module Inferno module CLI class Suites def run require_relative '../../../inferno' Inferno::Application.start(:suites) suites = Inferno::Repositories::TestSuites.new.all suite_hash = suites.each_with_object({}) { |suite, hash| hash[suite.id] = suite.title } id_column_length = suite_hash.keys.map(&:length).max + 1 title_column_length = suite_hash.values.map(&:length).max puts "#{'ID'.ljust(id_column_length)}| Title" puts "#{'-' * id_column_length}+-#{'-' * title_column_length}" suite_hash.each do |id, title| puts "#{id.ljust(id_column_length)}| #{title}" end end end end end
Version data entries
32 entries across 32 versions & 1 rubygems