<%- module_namespacing do -%> <%- module_name = class_name.split('::')[0..-2] -%> <%- if module_name.any? -%> module <%= class_name.split('::')[0..-2].join('::') %> <%- end -%> class <%= class_name.split('::').last %>Serializer < BaseSerializer attributes <%= attributes_names.map(&:inspect).join(", ") %> <%- association_names.each do |attribute| -%> has_one :<%= attribute %> <%- end -%> end <%- if module_name.any? -%> end <%- end -%> <%- end -%>