Class: RVideo::Tools::AbstractTool
- Inherits:
-
Object
- Object
- RVideo::Tools::AbstractTool
- Defined in:
- lib/rvideo/tools/abstract_tool.rb
Defined Under Namespace
Modules: InstanceMethods
Class Method Summary collapse
-
.assign(cmd, options = {}) ⇒ Object
AbstractTool is an interface to every transcoder tool class (e.g. ffmpeg, flvtool2).
Class Method Details
.assign(cmd, options = {}) ⇒ Object
AbstractTool is an interface to every transcoder tool class (e.g. ffmpeg, flvtool2). Called by the Transcoder class.
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/rvideo/tools/abstract_tool.rb', line 10 def self.assign(cmd, = {}) tool_name = File.split(cmd.split(" ").first).last begin tool = "RVideo::Tools::#{tool_name.classify}".constantize.send(:new, cmd, ) # rescue NameError, /uninitialized constant/ # raise TranscoderError::UnknownTool, "The recipe tried to use the '#{tool_name}' tool, which does not exist." rescue => e LOGGER.info $! LOGGER.info e.backtrace.join("\n") end end |