Class: OneRoster::Types::Class
Instance Attribute Summary collapse
-
#course_uid ⇒ Object
readonly
Returns the value of attribute course_uid.
-
#grades ⇒ Object
readonly
Returns the value of attribute grades.
-
#period ⇒ Object
readonly
Returns the value of attribute period.
-
#provider ⇒ Object
readonly
Returns the value of attribute provider.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#uid ⇒ Object
readonly
Returns the value of attribute uid.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Class
constructor
A new instance of Class.
Methods inherited from Base
Constructor Details
#initialize(attributes = {}) ⇒ Class
Returns a new instance of Class.
13 14 15 16 17 18 19 20 21 |
# File 'lib/types/class.rb', line 13 def initialize(attributes = {}, *) @uid = attributes['sourcedId'] @title = capitalize(attributes['title']) @course_uid = attributes['course']['sourcedId'] @status = attributes['status'] @period = first_period(attributes) || period_from_code(attributes) @grades = attributes['grades'] @provider = 'oneroster' end |
Instance Attribute Details
#course_uid ⇒ Object (readonly)
Returns the value of attribute course_uid.
6 7 8 |
# File 'lib/types/class.rb', line 6 def course_uid @course_uid end |
#grades ⇒ Object (readonly)
Returns the value of attribute grades.
6 7 8 |
# File 'lib/types/class.rb', line 6 def grades @grades end |
#period ⇒ Object (readonly)
Returns the value of attribute period.
6 7 8 |
# File 'lib/types/class.rb', line 6 def period @period end |
#provider ⇒ Object (readonly)
Returns the value of attribute provider.
6 7 8 |
# File 'lib/types/class.rb', line 6 def provider @provider end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
6 7 8 |
# File 'lib/types/class.rb', line 6 def title @title end |
#uid ⇒ Object (readonly)
Returns the value of attribute uid.
6 7 8 |
# File 'lib/types/class.rb', line 6 def uid @uid end |