Class: RGhost::StaticDocumentCallback

Inherits:
Function show all
Defined in:
lib/rghost/static_document_callback.rb

Overview

:nodoc:

Constant Summary collapse

ACCEPT =
[:before_document_create,
        :first_page,
        :last_page,
        :after_document_create 
]

Instance Attribute Summary

Attributes inherited from Function

#name

Instance Method Summary collapse

Methods inherited from Function

#ps, #use_template

Methods inherited from PsObject

#<<, #call, #graphic_scope, #ps, #raw, #set, #to_s

Constructor Details

#initialize(name, &block) ⇒ StaticDocumentCallback

Returns a new instance of StaticDocumentCallback.

Raises:

  • (NameError)


11
12
13
14
# File 'lib/rghost/static_document_callback.rb', line 11

def initialize(name,&block)
  raise NameError.new("#{name} no accept in #{self.class}") unless ACCEPT.include? name
  super(name,&block)
end