lib/meibo/japan_profile.rb in meibo-0.1.0 vs lib/meibo/japan_profile.rb in meibo-0.2.0

- old
+ new

@@ -1,11 +1,9 @@ # frozen_string_literal: true module Meibo - module JapanProfile - include BaseProfile - + class JapanProfile < ::Meibo::Profile BUILDERS = { academic_session: Builder::AcademicSessionBuilder.create(AcademicSession), class: Builder::ClassroomBuilder.create(Classroom), course: Builder::CourseBuilder.create(Course), demographic: Builder::DemographicBuilder.create(Demographic), @@ -15,25 +13,25 @@ user: Builder::UserBuilder.create(User), user_profile: Builder::UserProfileBuilder.create(UserProfile) } DATA_MODELS = { - file_academic_sessions: Meibo::JapanProfile::AcademicSession, - file_classes: Meibo::JapanProfile::Classroom, - file_courses: Meibo::JapanProfile::Course, - file_demographics: Meibo::JapanProfile::Demographic, - file_enrollments: Meibo::JapanProfile::Enrollment, - file_orgs: Meibo::JapanProfile::Organization, - file_roles: Meibo::JapanProfile::Role, - file_user_profiles: Meibo::JapanProfile::UserProfile, - file_users: Meibo::JapanProfile::User + file_academic_sessions: AcademicSession, + file_classes: Classroom, + file_courses: Course, + file_demographics: Demographic, + file_enrollments: Enrollment, + file_orgs: Organization, + file_roles: Role, + file_user_profiles: UserProfile, + file_users: User } - def self.builder_for(key) - BUILDERS[key] - end + DATA_SET = ::Meibo::Profile::DATA_SET.merge( + users: UserSet + ) - def self.data_model_for(file_attribute) - DATA_MODELS[file_attribute] + def initialize(builders: BUILDERS, data_models: DATA_MODELS, data_set: DATA_SET) + super end end end