Module: Serega::SeregaPlugins::Root::ClassMethods

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

Overview

Serega additional/patched class methods

See Also:

Instance Method Summary collapse

Instance Method Details

#root(root = nil, one: nil, many: nil) ⇒ Hash

Configures response root key



131
132
133
134
135
136
# File 'lib/serega/plugins/root/root.rb', line 131

def root(root = nil, one: nil, many: nil)
  one ||= root
  many ||= root

  config.root = {one: one, many: many}
end