Module: Serega::SeregaPlugins::Root::ConfigInstanceMethods

Defined in:
lib/serega/plugins/root/root.rb

Overview

Serega::SeregaConfig additional/patched class methods

Instance Method Summary collapse

Instance Method Details

#rootSerega::SeregaPlugins::Root::RootConfig



194
195
196
# File 'lib/serega/plugins/root/root.rb', line 194

def root
  @root ||= RootConfig.new(opts.fetch(:root))
end

#root=(value) ⇒ void

This method returns an undefined value.

Set root for one-object and many-objects serialization types

Options Hash (value):

  • :one (Symbol, String, nil)

    Root for one-object serialization type

  • :many (Symbol, String, nil)

    Root for many-objects serialization type



205
206
207
208
# File 'lib/serega/plugins/root/root.rb', line 205

def root=(value)
  root.one = value.fetch(:one)
  root.many = value.fetch(:many)
end