Method: RubbishCode::StudentListFormat#replace_student
- Defined in:
- lib/source/student_list_format.rb
#replace_student(id, student) ⇒ Object
33 34 35 |
# File 'lib/source/student_list_format.rb', line 33 def replace_student(id, student) self.students.map! { |x| x.id == id.to_s ? student : x } end |