Sha256: f76f74c31e022b44fc8dd433848afa169acd7376e4d63eb459bafd0e71ca8a3a

Contents?: true

Size: 496 Bytes

Versions: 14

Compression:

Stored size: 496 Bytes

Contents

module FLV
  module Edit
    module Processor

      # Head is a Processor class (see Base and desc)
      class Head < Base
        desc "Processes only the first NB tags.", :param => {:class => Integer, :name => "NB"}, :shortcut => "n"

        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
        
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
marcandre-flvedit-0.6.2 lib/flv/edit/processor/head.rb
marcandre-flvedit-0.6.3 lib/flvedit/processor/head.rb
marcandre-flvedit-0.6.4 lib/flvedit/processor/head.rb
marcandre-flvedit-0.7.0 lib/flvedit/processor/head.rb
marcandre-flvedit-0.7.1 lib/flvedit/processor/head.rb
marcandre-flvedit-0.7.2 lib/flvedit/processor/head.rb
marcandre-flvedit-0.7.3 lib/flvedit/processor/head.rb
flvedit-0.7.4 lib/flvedit/processor/head.rb
flvedit-0.7.2 lib/flvedit/processor/head.rb
flvedit-0.7.1 lib/flvedit/processor/head.rb
flvedit-0.6.4 lib/flvedit/processor/head.rb
flvedit-0.7.0 lib/flvedit/processor/head.rb
flvedit-0.6.3 lib/flvedit/processor/head.rb
flvedit-0.6.2 lib/flv/edit/processor/head.rb