Class: Sbire::AudioRecorder
- Inherits:
-
Object
- Object
- Sbire::AudioRecorder
- Defined in:
- lib/sbire/audio_recorder.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
Returns the value of attribute path.
-
#pid_manager ⇒ Object
Returns the value of attribute pid_manager.
Instance Method Summary collapse
-
#initialize(path, pid_manager) ⇒ AudioRecorder
constructor
A new instance of AudioRecorder.
- #start ⇒ Object
- #stop ⇒ Object
Constructor Details
#initialize(path, pid_manager) ⇒ AudioRecorder
Returns a new instance of AudioRecorder.
4 5 6 7 |
# File 'lib/sbire/audio_recorder.rb', line 4 def initialize(path, pid_manager) @path = path @pid_manager = pid_manager end |
Instance Attribute Details
#path ⇒ Object
Returns the value of attribute path.
3 4 5 |
# File 'lib/sbire/audio_recorder.rb', line 3 def path @path end |
#pid_manager ⇒ Object
Returns the value of attribute pid_manager.
3 4 5 |
# File 'lib/sbire/audio_recorder.rb', line 3 def pid_manager @pid_manager end |
Instance Method Details
#start ⇒ Object
9 10 11 12 |
# File 'lib/sbire/audio_recorder.rb', line 9 def start pid = record_audio pid_manager.store(self, pid) end |
#stop ⇒ Object
14 15 16 |
# File 'lib/sbire/audio_recorder.rb', line 14 def stop pid_manager.kill(self) end |