Class: Sox::Combiner::BaseStrategy

Inherits:
Object
  • Object
show all
Includes:
Shell
Defined in:
lib/sox/combiner/base_strategy.rb

Overview

Common parent class for combiner strategies.

Direct Known Subclasses

ProcessSubstitutionStrategy, TmpFileStrategy

Constant Summary

Constants included from Shell

Shell::BASH_PATH

Instance Method Summary collapse

Methods included from Shell

#bash, #sh

Constructor Details

#initialize(input_files, options) ⇒ BaseStrategy

Returns a new instance of BaseStrategy.

Parameters:



8
9
10
11
# File 'lib/sox/combiner/base_strategy.rb', line 8

def initialize(input_files, options)
  @input_files = input_files
  @options     = options
end

Instance Method Details

#output_effectsHash

Build effects which will be applied on final output.

Returns:

  • (Hash)


26
27
28
# File 'lib/sox/combiner/base_strategy.rb', line 26

def output_effects
  {:norm => @options[:norm]}
end

#output_optionsHash

Build global options for sox command.

Returns:

  • (Hash)


33
34
35
# File 'lib/sox/combiner/base_strategy.rb', line 33

def output_options
  {:combine => @options[:combine]}
end

#write(output_file) ⇒ void

This method returns an undefined value.

Run the command, and save output in the output file.

Parameters:

  • output_file (String)

Raises:

  • (NotImplementedError)


18
19
20
# File 'lib/sox/combiner/base_strategy.rb', line 18

def write(output_file)
  raise NotImplementedError, __method__
end