Class: PopCap::Converter
- Defined in:
- lib/pop_cap/ffmpeg/converter.rb
Overview
Public: This class converts an audio file to the specified output format.
Instance Attribute Summary
Attributes inherited from FFmpeg
#commander, #filepath, #options
Class Method Summary collapse
-
.convert(filepath, options = {}) ⇒ Object
Public: A convenience class method which wraps the instance constructor.
Instance Method Summary collapse
-
#convert ⇒ Object
Public: This method will execute the conversion.
Methods inherited from FFmpeg
#error_message, #execute, #initialize
Constructor Details
This class inherits a constructor from PopCap::FFmpeg
Class Method Details
.convert(filepath, options = {}) ⇒ Object
Public: A convenience class method which wraps the instance constructor.
19 20 21 |
# File 'lib/pop_cap/ffmpeg/converter.rb', line 19 def self.convert(filepath, ={}) new(filepath, ).convert end |
Instance Method Details
#convert ⇒ Object
Public: This method will execute the conversion.
10 11 12 13 14 |
# File 'lib/pop_cap/ffmpeg/converter.rb', line 10 def convert unless execute.success? raise(FFmpegError, ('converting')) end end |