Class: ServiceObjects::LeaveGoogleGroup

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

def call
  changes = Whitelist.filter(change.left_groups).each do |group|
    .leave! group
  end

  changes.any? ? :update : :skip
end

#ignore?Boolean

Returns:

  • (Boolean)

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

def ignore?
  Whitelist.filter(change.left_groups).none?
end