Class: Clever::Types::Teacher

Inherits:
Base
  • Object
show all
Defined in:
lib/clever/types/teacher.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#blank?, #presence, #to_h

Constructor Details

#initialize(attributes = {}) ⇒ Teacher

Returns a new instance of Teacher.



12
13
14
15
16
17
18
# File 'lib/clever/types/teacher.rb', line 12

def initialize(attributes = {}, *)
  @uid        = attributes['id']
  @email      = attributes['email']
  @first_name = attributes['name']['first']
  @last_name  = attributes['name']['last']
  @provider   = 'clever'
end

Instance Attribute Details

#emailObject (readonly)

Returns the value of attribute email.



6
7
8
# File 'lib/clever/types/teacher.rb', line 6

def email
  @email
end

#first_nameObject (readonly)

Returns the value of attribute first_name.



6
7
8
# File 'lib/clever/types/teacher.rb', line 6

def first_name
  @first_name
end

#last_nameObject (readonly)

Returns the value of attribute last_name.



6
7
8
# File 'lib/clever/types/teacher.rb', line 6

def last_name
  @last_name
end

#providerObject (readonly)

Returns the value of attribute provider.



6
7
8
# File 'lib/clever/types/teacher.rb', line 6

def provider
  @provider
end

#uidObject (readonly)

Returns the value of attribute uid.



6
7
8
# File 'lib/clever/types/teacher.rb', line 6

def uid
  @uid
end