Module: Pdfrb::Model::Cos::ArlingtonBacked
- Included in:
- Dictionary, PdfArray
- Defined in:
- lib/pdfrb/model/cos/arlington_backed.rb
Overview
Shared Arlington TSV binding for COS container classes. Cos::Dictionary extends this and merges field definitions via define_field; Model::PdfArray extends it and keeps the positional definition for element-type lookup. Either way the class is registered in Pdfrb::Model::Type.arlington_registry so field-link resolution can find it.
Instance Method Summary collapse
-
#arlington_object(name, version: "latest") ⇒ Object
Pull the named Arlington TSV.
Instance Method Details
#arlington_object(name, version: "latest") ⇒ Object
Pull the named Arlington TSV. Idempotent. Silently no-ops when the Arlington layer or the TSV is unavailable, so hand-coded subclasses still work.
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/pdfrb/model/cos/arlington_backed.rb', line 16 def arlington_object(name, version: "latest") return if arlington_loaded_for?(name) return unless arlington_available? definition = Pdfrb::Arlington::Loader.object_definition(name, version: version) return unless definition arlington_mark_loaded(name) Pdfrb::Model::Type.register_arlington(name, self) if Pdfrb::Model.const_defined?(:Type) apply_arlington_definition(definition) end |