File: static_document_callback.rb

package info (click to toggle)
ruby-rghost 0.9.9-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,188 kB
  • sloc: ruby: 3,374; makefile: 6; sh: 1
file content (14 lines) | stat: -rw-r--r-- 374 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
require "rghost/ps_object"
require "rghost/function"

class RGhost::StaticDocumentCallback < RGhost::Function # :nodoc:
  ACCEPT = [:before_document_create,
    :first_page,
    :last_page,
    :after_document_create]

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