Class RGhost::Callback
In: callback.rb
Parent: RGhost::PsObject

Callbacks are custom code blocks defined inside of Document. All callbacks received implicitly a instance of PsFacade can be creates any PsObject. The callbacks‘s execution depend of the algorithims predefined in Postscript core library. There are two kind of callbacks, Statics and Dynamics callbacks. A Static callback there aren‘t parameters to control of the inclusion and exception on current scope, usually applied for events which happen one time, for example after_document_create, "after document create" always will execute one time for each document. Otherwise Dynamic callbacks there is control of scope using conditional :only or :except, this is only difference in relation the static callbacks. The parameters of a Dynamic callbak must be one integer or one array of integer. Example: For all pages except page 3

 doc.before_page_create :except => 3 do
     # do something

For just 2 and 4 pages

 doc.before_page_create :only => [2,4] do
     # do something

The most of callbacks are defined in facades such as DocumentCallbackFacade and Grid::CallbackFacade


new   ps  

Included Modules



except  [RW] 
name  [RW] 
only  [RW] 

Public Class methods

Public Instance methods