class Net::IMAP::DataLite
DataLite subclasses ruby’s Data class and is aliased as Net::IMAP::Data, so that code using it won’t need to be updated when it is removed. It adds support for yaml encoding. When psych adds support for Data, DataLite will be removed.
Previously, DataLite served as a reimplementation of Data for ruby 3.1.
Public Instance Methods
Source
# File lib/net/imap/data_lite.rb, line 12 def encode_with(coder) coder.map = to_h.transform_keys(&:to_s) end
Source
# File lib/net/imap/data_lite.rb, line 13 def init_with(coder) initialize(**coder.map.transform_keys(&:to_sym)) end