Class: FLV::Edit::Processor::CommandLine

Inherits:
Base
  • Object
show all
Defined in:
lib/flv/edit/processor/command_line.rb

Constant Summary

Constants inherited from Base

Base::ALL_EVENTS, Base::EVENT_TRIGGER, Base::EVENT_TRIGGER_LIST, Base::MAIN_EVENTS

Instance Attribute Summary

Attributes inherited from Base

#options

Instance Method Summary collapse

Methods inherited from Base

#absorb, #dispatch_chunk, #dispatch_chunks, #dispatch_instead, #each, #has_next_file?, #initialize, #process_next_file, #rewind, #stdout, #stop

Constructor Details

This class inherits a constructor from FLV::Edit::Processor::Base

Instance Method Details

#on_header(h) ⇒ Object



5
6
7
# File 'lib/flv/edit/processor/command_line.rb', line 5

def on_header(h)
  @last = h.path
end

#process_allObject



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/flv/edit/processor/command_line.rb', line 9

def process_all
  ok, errors = [], []
  begin
    each{}
    ok << @last
  rescue Exception => e
    errors << [@last, e]
  end while has_next_file?
  puts (["Processed successfully:"] + ok).join("\n") unless ok.empty?
  puts (["**** Processed with errors: ****"] + errors.map{|path, err| "#{path}: #{err}"}).join("\n") unless errors.empty?
end