Module: Serega::SeregaPlugins::Root::InstanceMethods
- Defined in:
- lib/serega/plugins/root/root.rb
Overview
Serega additional/patched instance methods
Instance Method Summary collapse
-
#to_data(object, opts = nil) ⇒ Data, ...
Serializes provided object to a tree of Ruby Data objects.
Instance Method Details
#to_data(object, opts = nil) ⇒ Data, ...
Serializes provided object to a tree of Ruby Data objects. When a root key is configured, the result is wrapped in an outer Data object whose members include the root key plus any metadata keys.
228 229 230 231 232 |
# File 'lib/serega/plugins/root/root.rb', line 228 def to_data(object, opts = nil) opts = prepare_initial_serialization_opts(object, opts) serialized_data = serialize(object, opts) self.class::SeregaDataBuilder.call(self, serialized_data, opts) end |