Class: Bright::Student
Instance Attribute Summary collapse
-
#addresses ⇒ Object
- TODO
-
map contact info (addresses, email, phone, etc).
-
#contacts ⇒ Object
- TODO
-
map contact info (addresses, email, phone, etc).
-
#email_address ⇒ Object
- TODO
-
map contact info (addresses, email, phone, etc).
-
#enrollment ⇒ Object
- TODO
-
map contact info (addresses, email, phone, etc).
-
#phone_numbers ⇒ Object
- TODO
-
map contact info (addresses, email, phone, etc).
-
#school ⇒ Object
- TODO
-
map contact info (addresses, email, phone, etc).
Class Method Summary collapse
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#initialize(*args) ⇒ Student
constructor
A new instance of Student.
- #name ⇒ Object
Methods inherited from Model
Constructor Details
#initialize(*args) ⇒ Student
Returns a new instance of Student.
19 20 21 22 |
# File 'lib/bright/student.rb', line 19 def initialize(*args) super self.client_id ||= SecureRandom.uuid end |
Instance Attribute Details
#addresses ⇒ Object
- TODO
-
map contact info (addresses, email, phone, etc)
17 18 19 |
# File 'lib/bright/student.rb', line 17 def addresses @addresses end |
#contacts ⇒ Object
- TODO
-
map contact info (addresses, email, phone, etc)
17 18 19 |
# File 'lib/bright/student.rb', line 17 def contacts @contacts end |
#email_address ⇒ Object
- TODO
-
map contact info (addresses, email, phone, etc)
17 18 19 |
# File 'lib/bright/student.rb', line 17 def email_address @email_address end |
#enrollment ⇒ Object
- TODO
-
map contact info (addresses, email, phone, etc)
17 18 19 |
# File 'lib/bright/student.rb', line 17 def enrollment @enrollment end |
#phone_numbers ⇒ Object
- TODO
-
map contact info (addresses, email, phone, etc)
17 18 19 |
# File 'lib/bright/student.rb', line 17 def phone_numbers @phone_numbers end |
#school ⇒ Object
- TODO
-
map contact info (addresses, email, phone, etc)
17 18 19 |
# File 'lib/bright/student.rb', line 17 def school @school end |
Class Method Details
.attribute_names ⇒ Object
12 13 14 |
# File 'lib/bright/student.rb', line 12 def self.attribute_names @attribute_names end |
Instance Method Details
#<=>(other) ⇒ Object
28 29 30 31 32 |
# File 'lib/bright/student.rb', line 28 def <=>(other) (sis_student_id && sis_student_id == other.sis_student_id) || (state_student_id && state_student_id == other.state_student_id) || (first_name == other.first_name && middle_name == other.middle_name && last_name == other.last_name && birth_date == other.birth_date) end |
#name ⇒ Object
24 25 26 |
# File 'lib/bright/student.rb', line 24 def name "#{first_name} #{middle_name} #{last_name}".gsub(/\s+/, " ").strip end |