module Eco module API class MicroCases #self.define(:core_excluded) do |options| # @param person [Person] the person we want to update, carrying the changes to be done. # @param options [Hash] the options def core_excluded(person, options) ["supervisor_id"].tap do |core_excluded| unless person.new? exclusions = ["name", "external_id", "email", "filter_tags"].select do |attr| options.dig(:exclude, attr.to_sym) end core_excluded.concat(exclusions) end end end end end end