Class: WorkTogether::Group
- Inherits:
-
Object
- Object
- WorkTogether::Group
- Defined in:
- lib/work_together.rb
Class Method Summary collapse
Class Method Details
.all_students ⇒ Object
109 110 111 112 113 114 115 |
# File 'lib/work_together.rb', line 109 def self.all_students self.all.map do |group| group.students.map do |student| student end end.flatten end |
.display_groups ⇒ Object
117 118 119 120 121 122 123 124 125 |
# File 'lib/work_together.rb', line 117 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 |