Class: Pdfrb::Action::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/pdfrb/action/base.rb

Overview

Base action builder. Subclasses define action_type (the /S value) and to_pdf (type-specific serialization).

Class Method Summary collapse

Class Method Details

.action_typeSymbol

Returns the /S value (e.g. :GoTo, :URI).

Returns:

  • (Symbol)

    the /S value (e.g. :GoTo, :URI).

Raises:

  • (NotImplementedError)


10
11
12
# File 'lib/pdfrb/action/base.rb', line 10

def action_type
  raise NotImplementedError
end

.register_as(name = action_type) ⇒ Object



14
15
16
17
# File 'lib/pdfrb/action/base.rb', line 14

def register_as(name = action_type)
  Action.register(name, self)
  self
end