Class: ServiceObjects::SyncGoogleAccount

Inherits:
Base
  • Object
show all
Defined in:
lib/service_objects/sync_google_account.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
# File 'lib/service_objects/sync_google_account.rb', line 3

def call
  person = TrogdirPerson.new(change.person_uuid)
  .create_or_update!(person.first_or_preferred_name, person.last_name, person.department, person.title, person.privacy)
end

#ignore?Boolean

Returns:

  • (Boolean)

8
9
10
# File 'lib/service_objects/sync_google_account.rb', line 8

def ignore?
  !(change.university_email_added? || (change. && change.university_email_exists?))
end