Module: Serega::SeregaPlugins::Root::ClassMethods
- Defined in:
- lib/serega/plugins/root/root.rb
Instance Method Summary collapse
-
#root(root = nil, one: nil, many: nil) ⇒ Hash
Configures response root key.
Instance Method Details
#root(root = nil, one: nil, many: nil) ⇒ Hash
Configures response root key
38 39 40 41 42 43 44 45 46 |
# File 'lib/serega/plugins/root/root.rb', line 38 def root(root = nil, one: nil, many: nil) one ||= root many ||= root one = one.to_sym if one many = many.to_sym if many config.root = {one: one, many: many} end |