Class: FLV::Edit::Processor::Head

Inherits:
Base
  • Object
show all
Defined in:
lib/flvedit/processor/head.rb

Overview

Head is a Processor class (see Base and desc)

Instance Attribute Summary

Attributes inherited from Base

#options

Instance Method Summary collapse

Methods inherited from Base

#clone, #each_source, #initialize, #process_all

Constructor Details

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

Instance Method Details

#eachObject



9
10
11
12
13
14
15
# File 'lib/flvedit/processor/head.rb', line 9

def each
  count = options[:head]
  super do |chunk|
    yield chunk
    break if (count -= 1) < 0 # after the yield because we're not counting the header
  end
end