Fix Utils call
This commit is contained in:
parent
5c6b683526
commit
bb61d514a0
|
|
@ -144,7 +144,7 @@ class GroupStageService
|
|||
first_places = teams_per_group_ranked_transposed[0]
|
||||
second_places = teams_per_group_ranked_transposed[1]
|
||||
|
||||
second_places_new_order = split_and_rotate(second_places)
|
||||
second_places_new_order = Utils.split_and_rotate(second_places)
|
||||
|
||||
# zip the first and second places together
|
||||
# e.g. [1, 2, 3], [a, b, c] to [1, a, 2, b, 3, c]
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class Utils
|
|||
|
||||
# split the array in half and place the second half at the beginning
|
||||
# e.g. [1, 2, 3, 4, 5, 6] to [4, 5, 6, 1, 2, 3]
|
||||
def split_and_rotate(array)
|
||||
def self.split_and_rotate(array)
|
||||
# handle the case where the array has an odd number of elements
|
||||
middle_element = []
|
||||
if array.length.odd?
|
||||
|
|
|
|||
Loading…
Reference in New Issue