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
33 34 35 36 37 38 39 40 41 |
# File 'lib/serega/plugins/root/root.rb', line 33 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 |