Class: WorkTogether::Group
- Inherits:
-
Object
- Object
- WorkTogether::Group
- Defined in:
- lib/work_together.rb
Class Method Summary collapse
Class Method Details
.all_students ⇒ Object
108 109 110 111 112 113 114 |
# File 'lib/work_together.rb', line 108 def self.all_students self.all.map do |group| group.students.map do |student| student end end.flatten end |
.display_groups ⇒ Object
116 117 118 119 120 121 122 123 124 |
# File 'lib/work_together.rb', line 116 def self.display_groups Table.all.each_with_index do |table, i| puts "Group #{i + 1}:".colorize(:blue) table.students.each do |student| puts student.name.colorize(:light_blue) end puts "-------------------".colorize(:blue) end end |