Class: UqamGradeNotification::Student
- Inherits:
-
Object
- Object
- UqamGradeNotification::Student
- Defined in:
- lib/uqam_grade_notification/student.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#password ⇒ Object
readonly
Returns the value of attribute password.
Instance Method Summary collapse
- #grades ⇒ Object
-
#initialize(args) ⇒ Student
constructor
A new instance of Student.
Constructor Details
#initialize(args) ⇒ Student
Returns a new instance of Student.
9 10 11 12 13 |
# File 'lib/uqam_grade_notification/student.rb', line 9 def initialize args args = HashWithIndifferentAccess.new(args) @code = args.fetch("code") @password = args.fetch("password") end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
7 8 9 |
# File 'lib/uqam_grade_notification/student.rb', line 7 def code @code end |
#password ⇒ Object (readonly)
Returns the value of attribute password.
7 8 9 |
# File 'lib/uqam_grade_notification/student.rb', line 7 def password @password end |
Instance Method Details
#grades ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/uqam_grade_notification/student.rb', line 15 def grades @grades ||= semesters[0..1].map do |semester| courses = semester["programmes"][0]["activites"] courses.map do |course| get_results(course) end end end |