Class PDF::Reader::RegisterReceiver
In: lib/pdf/reader/register_receiver.rb
Parent: Object

An example receiver that just records all callbacks generated by parsing a PDF file.

Useful for testing the contents of a file in an rspec/test-unit suite.

Usage:

 receiver = PDF::Reader::RegisterReceiver.new
 PDF::Reader.file("somefile.pdf", receiver)
 callback = receiver.first_occurance_of(:show_text)
 callback[:args].first.should == "Hellow World"

Methods

Attributes

callbacks  [RW] 

Public Class methods

Public Instance methods

return the details for every time the specified callback was fired

count the number of times a callback fired

return the details for the final time the specified callback was fired

return the details for the first time the specified callback was fired

return the first occurance of a particular series of callbacks

[Validate]