Method: Sox::Combiner#initialize
- Defined in:
- lib/sox/combiner.rb
#initialize(input_files, options = {}) ⇒ Combiner
Returns a new instance of Combiner.
53 54 55 56 57 58 59 60 61 62 |
# File 'lib/sox/combiner.rb', line 53 def initialize(input_files, = {}) raise(ArgumentError, "Input files are missing") if input_files.empty? opts = DEFAULT_OPTIONS.merge() strategy_name = opts.delete(:strategy) strategy_class = STRATEGIES[strategy_name] raise(ArgumentError, "Unknown strategy #{strategy_name.inspect}") unless strategy_class @strategy = strategy_class.new(input_files, opts) end |