Class: Wonde::LessonAttendanceRecord
- Inherits:
-
Object
- Object
- Wonde::LessonAttendanceRecord
- Defined in:
- lib/writeback/lessonattendancerecord.rb
Instance Attribute Summary collapse
-
#attendance_code_id ⇒ Object
Returns the value of attribute attendance_code_id.
-
#lesson_id ⇒ Object
Returns the value of attribute lesson_id.
-
#student_id ⇒ Object
Returns the value of attribute student_id.
Instance Method Summary collapse
- #getAttendanceCodeId ⇒ Object
- #getLessonId ⇒ Object
- #getStudentId ⇒ Object
- #isValid ⇒ Object
- #setAttendanceCodeId(attendanceCodeId) ⇒ Object
- #setLessonId(lessonId) ⇒ Object
-
#setStudentId(studentId) ⇒ Object
most of these methods are here to be compatible 1:1 with the php module, standard ruby getters and setters should still work too.
- #toArray ⇒ Object
Instance Attribute Details
#attendance_code_id ⇒ Object
Returns the value of attribute attendance_code_id.
3 4 5 |
# File 'lib/writeback/lessonattendancerecord.rb', line 3 def attendance_code_id @attendance_code_id end |
#lesson_id ⇒ Object
Returns the value of attribute lesson_id.
3 4 5 |
# File 'lib/writeback/lessonattendancerecord.rb', line 3 def lesson_id @lesson_id end |
#student_id ⇒ Object
Returns the value of attribute student_id.
3 4 5 |
# File 'lib/writeback/lessonattendancerecord.rb', line 3 def student_id @student_id end |
Instance Method Details
#getAttendanceCodeId ⇒ Object
40 41 42 |
# File 'lib/writeback/lessonattendancerecord.rb', line 40 def getAttendanceCodeId() return self.attendance_code_id end |
#getLessonId ⇒ Object
36 37 38 |
# File 'lib/writeback/lessonattendancerecord.rb', line 36 def getLessonId() return self.lesson_id end |
#getStudentId ⇒ Object
32 33 34 |
# File 'lib/writeback/lessonattendancerecord.rb', line 32 def getStudentId() return self.student_id end |
#isValid ⇒ Object
28 29 30 |
# File 'lib/writeback/lessonattendancerecord.rb', line 28 def isValid() return ! (self.getStudentId().empty? || self.getLessonId().empty? || self.getAttendanceCodeId().empty?) end |
#setAttendanceCodeId(attendanceCodeId) ⇒ Object
21 22 23 24 25 26 |
# File 'lib/writeback/lessonattendancerecord.rb', line 21 def setAttendanceCodeId(attendanceCodeId) if attendanceCodeId.empty? or attendanceCodeId.nil? throw InvalidLessonAttendanceException, 'Attendance code id can not be set to null.' end @attendance_code_id = attendanceCodeId end |
#setLessonId(lessonId) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/writeback/lessonattendancerecord.rb', line 14 def setLessonId(lessonId) if lessonId.empty? or lessonId.nil? throw InvalidLessonAttendanceException, 'Lesson id can not be set to null.' end @lesson_id = lessonId end |
#setStudentId(studentId) ⇒ Object
most of these methods are here to be compatible 1:1 with the php module, standard ruby getters and setters should still work too
7 8 9 10 11 12 |
# File 'lib/writeback/lessonattendancerecord.rb', line 7 def setStudentId(studentId) if studentId.empty? or studentId.nil? throw InvalidLessonAttendanceException, 'Student id can not be set to null.' end @student_id = studentId end |
#toArray ⇒ Object
44 45 46 47 48 49 50 51 |
# File 'lib/writeback/lessonattendancerecord.rb', line 44 def toArray() required = { 'lesson_id': self.getLessonId(), 'student_id': self.getStudentId(), 'attendance_code_id': self.getAttendanceCodeId() } return required end |