module LightSerializer::Helpers::WithCustomRoot

Public Instance Methods

with_custom_root(root) { || ... } click to toggle source

:reek: UtilityFunction

# File lib/light_serializer/helpers/with_custom_root.rb, line 7
def with_custom_root(root)
  root ? { root.to_s => yield } : yield
end