Class: Pdfrb::Model::Type::Annotation
- Inherits:
-
Cos::Dictionary
- Object
- Object
- Cos::Dictionary
- Pdfrb::Model::Type::Annotation
- Defined in:
- lib/pdfrb/model/type/annotation.rb
Overview
Annotation base class (s12.5). The base dict shape is encoded across the per-subtype TSVs (AnnotLink, AnnotText, ...), not a single Annot.tsv — so the base class registers in the type_map and dispatches to a specific subtype class via /Subtype lookup.
Instance Attribute Summary
Attributes inherited from Object
Class Method Summary collapse
- .for_subtype(symbol) ⇒ Object
- .register_subtype(symbol, klass = self) ⇒ Object
-
.subtype_map ⇒ Object
Dispatch by /Subtype.
Methods inherited from Cos::Dictionary
#[], #[]=, arlington_available?, arlington_default, arlington_key_to_symbol, arlington_loaded_for?, arlington_mark_loaded, arlington_object, arlington_one_type_to_ruby, arlington_required?, arlington_types_to_ruby, arlington_version, define_field, define_field_from_arlington, #delete, #each, each_field, #each_raw, #empty?, field, #initialize, #key?, #keys, lookup_type, own_fields, #pdf_type, register_type, type_map, #validate
Methods inherited from Object
#==, define_type, #deref, #indirect?, #initialize, #must_be_indirect?, #pdf_type, pdf_type
Constructor Details
This class inherits a constructor from Pdfrb::Model::Cos::Dictionary
Class Method Details
.for_subtype(symbol) ⇒ Object
42 43 44 |
# File 'lib/pdfrb/model/type/annotation.rb', line 42 def for_subtype(symbol) subtype_map[symbol] end |
.register_subtype(symbol, klass = self) ⇒ Object
38 39 40 |
# File 'lib/pdfrb/model/type/annotation.rb', line 38 def register_subtype(symbol, klass = self) subtype_map[symbol] = klass end |
.subtype_map ⇒ Object
Dispatch by /Subtype. Subclasses register via
register_subtype :Link.
34 35 36 |
# File 'lib/pdfrb/model/type/annotation.rb', line 34 def subtype_map @subtype_map ||= {} end |