Class: ServiceObjects::UpdateEmailAddress

Inherits:
Base
  • Object
show all
Defined in:
lib/service_objects/update_email_address.rb

Instance Attribute Summary

Attributes inherited from Base

#change

Instance Method Summary collapse

Methods inherited from Base

ignore?, #initialize

Constructor Details

This class inherits a constructor from ServiceObjects::Base

Instance Method Details

#callObject


3
4
5
6
7
8
9
# File 'lib/service_objects/update_email_address.rb', line 3

def call  # The ID hash does not come through with the hash of the person ids
  # So we have to make a work around for it.

  biola_id = TrogdirPerson.new(change.person_uuid).biola_id
  UpdateLegacyEmailTable.new(change).insert_and_update(biola_id, change.old_university_email, change.new_university_email)
  :update
end

#ignore?Boolean

Returns:

  • (Boolean)

11
12
13
# File 'lib/service_objects/update_email_address.rb', line 11

def ignore?
  !change.university_email_updated?
end