module HexaPDF::DictionaryFields::ArrayConverter
Converter module for fields of type PDFArray
.
Public Class Methods
additional_types()
click to toggle source
PDFArray
fields can also contain simple arrays.
# File lib/hexapdf/dictionary_fields.rb, line 209 def self.additional_types Array end
convert(data, _type, document)
click to toggle source
Wraps a given array in the PDFArray
class. Otherwise returns nil
.
# File lib/hexapdf/dictionary_fields.rb, line 214 def self.convert(data, _type, document) return unless data.kind_of?(Array) document.wrap(data, type: PDFArray) end
usable_for?(type)
click to toggle source
This converter is usable if the type
is PDFArray
.
# File lib/hexapdf/dictionary_fields.rb, line 204 def self.usable_for?(type) type == PDFArray end