Class: RGhost::DynamicDocumentCallback

Inherits:
Callback show all
Defined in:
lib/rghost/dynamic_document_callback.rb

Overview

:nodoc:

Constant Summary collapse

ACCEPT =
[:before_page_create,
  :after_page_create,
  :odd_pages,
  :even_pages
]

Instance Attribute Summary

Attributes inherited from Callback

#except, #name, #only

Instance Method Summary collapse

Methods inherited from Callback

#ps

Methods included from RubyToPs

#array_to_stack, #hash_to_array, #pack_string, #ps_escape, #string_eval, #to_array, #to_bool, #to_string, #to_string_array

Methods inherited from PsObject

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

Constructor Details

#initialize(name, options = {}, &block) ⇒ DynamicDocumentCallback

Returns a new instance of DynamicDocumentCallback.

Raises:

  • (NameError)


10
11
12
13
# File 'lib/rghost/dynamic_document_callback.rb', line 10

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