Module: FLV::Edit::Processor

Defined in:
lib/flvedit/processor/add.rb,
lib/flvedit/processor/cut.rb,
lib/flvedit/processor/base.rb,
lib/flvedit/processor/head.rb,
lib/flvedit/processor/join.rb,
lib/flvedit/processor/save.rb,
lib/flvedit/processor/debug.rb,
lib/flvedit/processor/print.rb,
lib/flvedit/processor/filter.rb,
lib/flvedit/processor/reader.rb,
lib/flvedit/processor/update.rb,
lib/flvedit/processor/printer.rb,
lib/flvedit/processor/dispatcher.rb,
lib/flvedit/processor/command_line.rb,
lib/flvedit/processor/meta_data_maker.rb

Defined Under Namespace

Modules: Dispatcher, Filter, MainEvent Classes: Add, Base, CommandLine, Cut, Debug, Head, Join, MetaDataMaker, Print, Printer, Reader, Save, Update

Class Method Summary collapse

Class Method Details

.chain(chain_classes, options = {}) ⇒ Object

Utility function to create a chain of Processors. Example:

chain(Update, Debug, Cut, options)
# ==> Update.new(Debug.new(Cut.new(options),options),options)


78
79
80
81
# File 'lib/flvedit/processor/base.rb', line 78

def self.chain(chain_classes, options = {})
  next_chain_class = chain_classes.pop
  next_chain_class.new(chain(chain_classes, options), options) if next_chain_class
end