Module: Meibo::JapanProfile::User::InstanceMethods

Included in:
Meibo::JapanProfile::User, Meibo::JapanProfile::UserM0
Defined in:
lib/meibo/japan_profile/user.rb

Instance Method Summary collapse

Instance Method Details

#home_classroomObject



34
35
36
# File 'lib/meibo/japan_profile/user.rb', line 34

def home_classroom
  home_class && Meibo.current_roster.classes.find(home_class)
end

#initialize(enabled_user: true, kana_given_name: nil, kana_family_name: nil, kana_middle_name: nil, home_class: nil, **other_fields) ⇒ Object

NOTE: enabled_userは必須ではないが固定



25
26
27
28
29
30
31
32
# File 'lib/meibo/japan_profile/user.rb', line 25

def initialize(enabled_user: true, kana_given_name: nil, kana_family_name: nil, kana_middle_name: nil,
               home_class: nil, **other_fields)
  super(enabled_user: enabled_user, **other_fields)
  @kana_given_name = kana_given_name
  @kana_family_name = kana_family_name
  @kana_middle_name = kana_middle_name
  @home_class = home_class
end