Class: Clever::Types::Section
Instance Attribute Summary collapse
-
#course ⇒ Object
readonly
Returns the value of attribute course.
-
#grades ⇒ Object
readonly
Returns the value of attribute grades.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#period ⇒ Object
readonly
Returns the value of attribute period.
-
#primary_teacher_uid ⇒ Object
readonly
Returns the value of attribute primary_teacher_uid.
-
#provider ⇒ Object
readonly
Returns the value of attribute provider.
-
#students ⇒ Object
readonly
Returns the value of attribute students.
-
#subjects ⇒ Object
readonly
Returns the value of attribute subjects.
-
#teachers ⇒ Object
readonly
Returns the value of attribute teachers.
-
#term_id ⇒ Object
readonly
Returns the value of attribute term_id.
-
#uid ⇒ Object
readonly
Returns the value of attribute uid.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Section
constructor
A new instance of Section.
Methods inherited from Base
Constructor Details
#initialize(attributes = {}) ⇒ Section
Returns a new instance of Section.
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/clever/types/section.rb', line 18 def initialize(attributes = {}, *) @uid = attributes['id'] @name = attributes['name'] @period = attributes['period'] @course = attributes['course'] @grades = [presence(attributes['grade'])].compact @subjects = [presence(attributes['subject'])].compact @students = attributes['students'] @teachers = attributes['teachers'] @term_id = attributes['term_id'] @provider = 'clever' @primary_teacher_uid = attributes['teacher'] end |
Instance Attribute Details
#course ⇒ Object (readonly)
Returns the value of attribute course.
6 7 8 |
# File 'lib/clever/types/section.rb', line 6 def course @course end |
#grades ⇒ Object (readonly)
Returns the value of attribute grades.
6 7 8 |
# File 'lib/clever/types/section.rb', line 6 def grades @grades end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/clever/types/section.rb', line 6 def name @name end |
#period ⇒ Object (readonly)
Returns the value of attribute period.
6 7 8 |
# File 'lib/clever/types/section.rb', line 6 def period @period end |
#primary_teacher_uid ⇒ Object (readonly)
Returns the value of attribute primary_teacher_uid.
6 7 8 |
# File 'lib/clever/types/section.rb', line 6 def primary_teacher_uid @primary_teacher_uid end |
#provider ⇒ Object (readonly)
Returns the value of attribute provider.
6 7 8 |
# File 'lib/clever/types/section.rb', line 6 def provider @provider end |
#students ⇒ Object (readonly)
Returns the value of attribute students.
6 7 8 |
# File 'lib/clever/types/section.rb', line 6 def students @students end |
#subjects ⇒ Object (readonly)
Returns the value of attribute subjects.
6 7 8 |
# File 'lib/clever/types/section.rb', line 6 def subjects @subjects end |
#teachers ⇒ Object (readonly)
Returns the value of attribute teachers.
6 7 8 |
# File 'lib/clever/types/section.rb', line 6 def teachers @teachers end |
#term_id ⇒ Object (readonly)
Returns the value of attribute term_id.
6 7 8 |
# File 'lib/clever/types/section.rb', line 6 def term_id @term_id end |
#uid ⇒ Object (readonly)
Returns the value of attribute uid.
6 7 8 |
# File 'lib/clever/types/section.rb', line 6 def uid @uid end |