Class: FLV::Edit::Processor::Add

Inherits:
Base
  • Object
show all
Includes:
Dispatcher
Defined in:
lib/flvedit/processor/add.rb

Overview

Add is a Processor (see Base and desc)

Constant Summary

Constants included from Dispatcher

Dispatcher::ALL_EVENTS, Dispatcher::EVENT_TRIGGER, Dispatcher::EVENT_TRIGGER_LIST, Dispatcher::MAIN_EVENTS

Instance Method Summary collapse

Methods included from Dispatcher

#absorb, #dispatch_instead, #each, included, #initialize, #stop

Methods included from Base

#getters, included, #is?, #size, #to_hash

Instance Method Details

#on_header(tag) ⇒ Object



15
16
17
# File 'lib/flvedit/processor/add.rb', line 15

def on_header(tag)
  @add = (options[:add_tags] || read_tag_file).sort_by(&:timestamp)
end

#on_tag(tag) ⇒ Object



19
20
21
# File 'lib/flvedit/processor/add.rb', line 19

def on_tag(tag)
  insert_before tag, @add
end