Class: Uaeds::JSONPerson
Instance Method Summary collapse
- #cat_card ⇒ Object
- #cn ⇒ Object
- #date_of_birth ⇒ Object
- #department ⇒ Object
- #department_name ⇒ Object
- #dob ⇒ Object
- #edu_person_primary_affiliation ⇒ Object
- #emplid ⇒ Object
- #employee_id ⇒ Object
- #employee_primary_dept ⇒ Object
- #employee_primary_dept_name ⇒ Object
- #employee_title ⇒ Object
- #full_name ⇒ Object
-
#initialize(hash = nil) ⇒ JSONPerson
constructor
A new instance of JSONPerson.
- #iso_number ⇒ Object
- #lookup_value(val) ⇒ Object
- #name ⇒ Object
- #netid ⇒ Object
- #person_type ⇒ Object
- #title ⇒ Object
- #uaid ⇒ Object
- #uid ⇒ Object
Methods inherited from DSML
Constructor Details
#initialize(hash = nil) ⇒ JSONPerson
Returns a new instance of JSONPerson.
6 7 8 9 |
# File 'lib/uaeds/json_person.rb', line 6 def initialize(hash=nil) raise ArgumentError, 'Argument is not a hash' unless (hash && hash.is_a?(Hash)) @value_h = hash end |
Instance Method Details
#cat_card ⇒ Object
31 32 33 |
# File 'lib/uaeds/json_person.rb', line 31 def cat_card iso_number end |
#cn ⇒ Object
55 56 57 |
# File 'lib/uaeds/json_person.rb', line 55 def cn lookup_value(:cn) end |
#date_of_birth ⇒ Object
11 12 13 |
# File 'lib/uaeds/json_person.rb', line 11 def date_of_birth lookup_value(:dateOfBirth) end |
#department ⇒ Object
75 76 77 |
# File 'lib/uaeds/json_person.rb', line 75 def department employee_primary_dept end |
#department_name ⇒ Object
83 84 85 |
# File 'lib/uaeds/json_person.rb', line 83 def department_name employee_primary_dept_name end |
#dob ⇒ Object
15 16 17 |
# File 'lib/uaeds/json_person.rb', line 15 def dob date_of_birth end |
#edu_person_primary_affiliation ⇒ Object
63 64 65 |
# File 'lib/uaeds/json_person.rb', line 63 def edu_person_primary_affiliation lookup_value(:eduPersonPrimaryAffiliation) end |
#emplid ⇒ Object
43 44 45 |
# File 'lib/uaeds/json_person.rb', line 43 def emplid lookup_value(:emplId) end |
#employee_id ⇒ Object
39 40 41 |
# File 'lib/uaeds/json_person.rb', line 39 def employee_id emplid end |
#employee_primary_dept ⇒ Object
79 80 81 |
# File 'lib/uaeds/json_person.rb', line 79 def employee_primary_dept lookup_value(:employeePrimaryDept) end |
#employee_primary_dept_name ⇒ Object
87 88 89 |
# File 'lib/uaeds/json_person.rb', line 87 def employee_primary_dept_name lookup_value(:employeePrimaryDeptName) end |
#employee_title ⇒ Object
71 72 73 |
# File 'lib/uaeds/json_person.rb', line 71 def employee_title lookup_value(:employeeTitle) end |
#full_name ⇒ Object
51 52 53 |
# File 'lib/uaeds/json_person.rb', line 51 def full_name cn end |
#iso_number ⇒ Object
35 36 37 |
# File 'lib/uaeds/json_person.rb', line 35 def iso_number lookup_value(:isoNumber) end |
#lookup_value(val) ⇒ Object
91 92 93 94 95 96 97 98 |
# File 'lib/uaeds/json_person.rb', line 91 def lookup_value(val) k = val.to_s.downcase if(@value_h.key? k) @value_h[k] else nil end end |
#name ⇒ Object
47 48 49 |
# File 'lib/uaeds/json_person.rb', line 47 def name cn end |
#netid ⇒ Object
19 20 21 |
# File 'lib/uaeds/json_person.rb', line 19 def netid uid end |
#person_type ⇒ Object
59 60 61 |
# File 'lib/uaeds/json_person.rb', line 59 def person_type edu_person_primary_affiliation end |
#title ⇒ Object
67 68 69 |
# File 'lib/uaeds/json_person.rb', line 67 def title employee_title end |
#uaid ⇒ Object
27 28 29 |
# File 'lib/uaeds/json_person.rb', line 27 def uaid lookup_value(:uaId) end |
#uid ⇒ Object
23 24 25 |
# File 'lib/uaeds/json_person.rb', line 23 def uid lookup_value(:uid) end |