Class: Chorus
- Inherits:
-
Object
- Object
- Chorus
- Defined in:
- lib/chorus.rb,
lib/chorus/version.rb
Constant Summary collapse
- VERSION =
"0.0.2"
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Chorus
constructor
A new instance of Chorus.
Constructor Details
#initialize(options = {}) ⇒ Chorus
Returns a new instance of Chorus.
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/chorus.rb', line 5 def initialize( = {}) = {:voices => ["Fred", "Kathy"]} = .merge!() [:voices].each_with_index do |voice, i| Thread.new do `say -v #{voice} "#{[:text]}"` end sleep [:delay] if [:delay] && [:voices].length != i+1 end end |