Sha256: ffc076d2cd3d7385c383a3f3a15855483efc4dee4bf73657a13717804c4ffaaa
Contents?: true
Size: 946 Bytes
Versions: 50
Compression:
Stored size: 946 Bytes
Contents
module Eco module API class UseCases class DefaultCases class NewEmailCase < DefaultCase def process @cases.define("new-email", type: :sync) do |entries, people, session, options, usecase| job = session.job_group("main").new("update", usecase: usecase, type: :update, sets: :core) strict_search = session.config.people.strict_search? && (!options[:search]&.key?(:strict) || options.dig(:search, :strict)) entries.each.with_index do |entry, i| if person = people.find(entry, strict: strict_search) person.email = entry.email job.add(person) else session.logger.error("Entry(#{i}) - this person does not exist: #{entry.to_s(:identify)}") end end end end end end end end end
Version data entries
50 entries across 50 versions & 1 rubygems