lib/hexapdf/dictionary.rb in hexapdf-0.14.2 vs lib/hexapdf/dictionary.rb in hexapdf-0.14.3
- old
+ new
@@ -154,9 +154,12 @@
# * Automatically wraps hash values in specific subclasses of this class if field information is
# available (see ::define_field).
#
# * Returns the default value if one is specified and no value is available.
#
+ # Note: If field information is available for the entry, a Hash or Array value will always be
+ # wrapped by Dictionary or PDFArray. Otherwise, the value will be returned as-is.
+ #
# Note: This method may throw a "can't add a new key into hash during iteration" error in
# certain cases because it potentially modifies the underlying hash!
def [](name)
field = self.class.field(name)
data = if key?(name)