Unnecessary variable assignment
This commit is contained in:
parent
bbeda07028
commit
fdac71a9f1
|
|
@ -6,9 +6,8 @@ class GroupStageService
|
||||||
|
|
||||||
average_group_size = (groups.flatten.length.to_f / groups.length.to_f)
|
average_group_size = (groups.flatten.length.to_f / groups.length.to_f)
|
||||||
if (average_group_size % 1).zero?
|
if (average_group_size % 1).zero?
|
||||||
groups = groups.map { |group| get_group_object_from(group) }
|
groups = groups.map(&method(:get_group_object_from))
|
||||||
group_stage = Stage.new level: -1, groups: groups
|
Stage.new level: -1, groups: groups
|
||||||
group_stage
|
|
||||||
else
|
else
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
|
|
@ -16,8 +15,7 @@ class GroupStageService
|
||||||
|
|
||||||
def self.get_group_object_from(team_array)
|
def self.get_group_object_from(team_array)
|
||||||
matches = generate_all_matches_between team_array
|
matches = generate_all_matches_between team_array
|
||||||
group = Group.new matches: matches
|
Group.new matches: matches
|
||||||
group
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.generate_all_matches_between(teams)
|
def self.generate_all_matches_between(teams)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue