Class: User
- Inherits:
-
Object
- Object
- User
- Defined in:
- lib/User.rb
Instance Method Summary collapse
- #get_csv_format ⇒ Object
- #set_email(email_domain) ⇒ Object
- #set_name(name) ⇒ Object
- #set_sis(sis_id) ⇒ Object
Instance Method Details
#get_csv_format ⇒ Object
34 35 36 37 |
# File 'lib/User.rb', line 34 def get_csv_format csv_string = "#{@user_id},#{@integration_id},#{@login_id},#{@password},#{@first_name},#{@last_name},#{@full_name},#{@sortable_name},#{@short_name},#{@email},#{@pronouns},#{@status}" return csv_string end |
#set_email(email_domain) ⇒ Object
30 31 32 |
# File 'lib/User.rb', line 30 def set_email(email_domain) @email = "#{@user_id}@#{email_domain}" end |
#set_name(name) ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/User.rb', line 15 def set_name(name) n = name.split(" ") @first_name = n.shift @last_name = "#{n.shift} #{n.shift}".strip @full_name = name @sortable_name = name @short_name = @first_name end |
#set_sis(sis_id) ⇒ Object
24 25 26 27 28 |
# File 'lib/User.rb', line 24 def set_sis(sis_id) @user_id = sis_id @login_id = sis_id @password = sis_id end |