Class: Death::Voice
- Inherits:
-
Object
- Object
- Death::Voice
- Defined in:
- lib/death/voice.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(ressure_factor = 3) ⇒ Voice
constructor
A new instance of Voice.
- #say(message) ⇒ Object
Constructor Details
#initialize(ressure_factor = 3) ⇒ Voice
Returns a new instance of Voice.
12 13 14 |
# File 'lib/death/voice.rb', line 12 def initialize(ressure_factor = 3) @ressure_factor = ressure_factor end |
Class Method Details
.say(message) ⇒ Object
7 8 9 |
# File 'lib/death/voice.rb', line 7 def say() new.say() end |
Instance Method Details
#say(message) ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/death/voice.rb', line 16 def say() raise 'death command is supporting only Mac OS X.' unless supported_os? fork do sound_pressure { spawn("say -v Ralph #{Shellwords.shellescape()}") } end end |