Jay McGavren's Journal

2008-08-27

OK, so it's not useful NOW...

Added to “utility/enhancements.rb”…

class String
	#Uses Windows Speech API to speak string.
	def speak
		require 'win32/sapi5'
		Win32::SpVoice.new.Speak(self.to_s)
	end
end

99.downto(1) {|n| "#{n} bottles of beer on the wall".speak}
comments powered by Disqus