Class: Github::Nippou::Commands

Inherits:
Thor
  • Object
show all
Defined in:
lib/github/nippou/commands.rb

Instance Method Summary collapse

Instance Method Details

#listObject



20
21
22
23
24
25
26
27
28
29
30
# File 'lib/github/nippou/commands.rb', line 20

def list
  lines = []
  mutex = Mutex::new

  Parallel.each_with_index(user_events, in_threads: thread_num) do |user_event, i|
    line = format_line(user_event, i)
    mutex.synchronize { lines << line }
  end

  puts sort(lines)
end

#versionObject



33
34
35
# File 'lib/github/nippou/commands.rb', line 33

def version
  puts VERSION
end