Class: Azuma::CLI

Inherits:
Object
  • Object
show all
Defined in:
lib/azuma/cli.rb

Class Method Summary collapse

Class Method Details

.start(talkers) ⇒ Object


5
6
7
8
9
10
11
12
13
14
15
# File 'lib/azuma/cli.rb', line 5

def self.start(talkers)
  roulette = Azuma.entry(talkers)

  Signal.trap(:EXIT) { puts; exit! }

  puts 'Ctrl-D to exit'

  while Readline.readline('> press enter to show next talker', true)
    break unless roulette.next_talker
  end
end