Module: Azuma::Announcement

Defined in:
lib/azuma/announcement.rb

Instance Method Summary collapse

Instance Method Details

#next_talkerObject


5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/azuma/announcement.rb', line 5

def next_talker
  super.tap do |talker|
    message = if talker
      "次は#{talker}さんの番です。"
    else
      "もう発表者はいません。お疲れ様でした。"
    end

    puts message

    if /darwin/ === RUBY_PLATFORM
      spawn("say #{Shellwords.shellescape(message)}")
    end
  end
end