Make stage seed instance variables less ambiguous
This commit is contained in:
parent
95f2826e1a
commit
5b019f4317
|
|
@ -12,13 +12,13 @@ module Gitlab
|
||||||
@pipeline = pipeline
|
@pipeline = pipeline
|
||||||
@attributes = attributes
|
@attributes = attributes
|
||||||
|
|
||||||
@seeds = attributes.fetch(:builds).map do |attributes|
|
@builds = attributes.fetch(:builds).map do |attributes|
|
||||||
Seed::Build.new(@pipeline, attributes)
|
Seed::Build.new(@pipeline, attributes)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def user=(current_user)
|
def user=(current_user)
|
||||||
@seeds.each { |seed| seed.user = current_user }
|
@builds.each { |seed| seed.user = current_user }
|
||||||
end
|
end
|
||||||
|
|
||||||
def attributes
|
def attributes
|
||||||
|
|
@ -28,8 +28,8 @@ module Gitlab
|
||||||
end
|
end
|
||||||
|
|
||||||
def seeds
|
def seeds
|
||||||
strong_memoize(:seeds_included) do
|
strong_memoize(:seeds) do
|
||||||
@seeds.select(&:included?)
|
@builds.select(&:included?)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue