Method: LearnSprout::Teacher#initialize
- Defined in:
- lib/learnsprout/teacher.rb
#initialize(attrs = {}) ⇒ Teacher
Returns a new instance of Teacher.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/learnsprout/teacher.rb', line 16 def initialize(attrs={}) @client = attrs["client"] @org_id = attrs["org_id"] @teacher_id = attrs["id"] @first_name = attrs["first_name"] @middle_name = attrs["middle_name"] @last_name = attrs["last_name"] @title = attrs["title"] @address = attrs["address"] && Address.new(attrs["address"]) @school_id = attrs["school"] && attrs["school"]["id"] @number = attrs["number"] @phone = attrs["phone"] && Phone.new(attrs["phone"]) @time_updated = attrs["time_updated"] @email = attrs["email"] end |