Class: Meibo::UserSet

Inherits:
DataSet show all
Defined in:
lib/meibo/user_set.rb

Direct Known Subclasses

JapanProfile::UserSet

Instance Attribute Summary

Attributes inherited from DataSet

#roster

Instance Method Summary collapse

Methods inherited from DataSet

#<<, #each, #empty?, #find, #initialize, #lineno, #where

Constructor Details

This class inherits a constructor from Meibo::DataSet

Instance Method Details

#check_semantically_consistentObject

Raises:



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/meibo/user_set.rb', line 5

def check_semantically_consistent
  super

  raise Error, "userMasterIdentifier\u304C\u91CD\u8907\u3057\u3066\u3044\u307E\u3059" if @data.filter_map(&:user_master_identifier).tally.values.any? { |v| v > 1 }

  each do |user|
    roster.organizations.find(user.primary_org_sourced_id) if user.primary_org_sourced_id

    user.agent_sourced_ids.each do |agent_sourced_id|
      find(agent_sourced_id)
    end
  end
end