Class: Clever::Types::Enrollment

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#blank?, #presence, #to_h

Constructor Details

#initialize(attributes = {}) ⇒ Enrollment

Returns a new instance of Enrollment.



11
12
13
14
15
16
# File 'lib/clever/types/enrollment.rb', line 11

def initialize(attributes = {})
  @classroom_uid   = attributes['classroom_uid']
  @user_uid        = attributes['user_uid']
  @provider        = 'clever'
  @primary         = attributes.dig('primary') || false
end

Instance Attribute Details

#classroom_uidObject (readonly)

Returns the value of attribute classroom_uid.



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

def classroom_uid
  @classroom_uid
end

#primaryObject (readonly)

Returns the value of attribute primary.



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

def primary
  @primary
end

#providerObject (readonly)

Returns the value of attribute provider.



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

def provider
  @provider
end

#user_uidObject (readonly)

Returns the value of attribute user_uid.



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

def user_uid
  @user_uid
end