module HexaPDF::DictionaryFields::ArrayConverter

def self.additional_types

PDFArray fields can also contain simple arrays.
def self.additional_types
  Array
end

def self.convert(data, _type, document)

Wraps a given array in the PDFArray class. Otherwise returns +nil+.
def self.convert(data, _type, document)
  return unless data.kind_of?(Array)
  document.wrap(data, type: PDFArray)
end

def self.usable_for?(type)

This converter is usable if the +type+ is PDFArray.
def self.usable_for?(type)
  type == PDFArray
end