Class: CheckAll

Inherits:
Object
  • Object
show all
Defined in:
lib/tasks/check_all.rb

Constant Summary collapse

TASKNAMES =
%i[rubocop spec steep:check yard:check].freeze
LINE =
Paint["-" * (IO.console or raise).winsize[1], :bold]
TITLE_TEMPLATE =
Paint["\n#{LINE}\nExecute: %<command>s\n#{LINE}\n\n", :bold]

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCheckAll

Returns a new instance of CheckAll.



19
20
21
# File 'lib/tasks/check_all.rb', line 19

def initialize
  @failed_commands = []
end

Instance Attribute Details

#failed_commandsObject (readonly)

Returns the value of attribute failed_commands.



13
14
15
# File 'lib/tasks/check_all.rb', line 13

def failed_commands
  @failed_commands
end

Class Method Details

.callObject



15
16
17
# File 'lib/tasks/check_all.rb', line 15

def self.call
  new.call
end

Instance Method Details

#callObject



23
24
25
26
# File 'lib/tasks/check_all.rb', line 23

def call
  TASKNAMES.map { |taskname| Thread.new(taskname, &executor) }.each(&:join)
  output_result
end