Commit cc2c737d authored by Lin Jen-Shin's avatar Lin Jen-Shin

Just use @project directly

parent bea29327
......@@ -11,15 +11,13 @@ module Projects
%r{\Arefs/(?:#{names})/}
end
attr_reader :project
def initialize(project)
@project = project
end
# This could raise Projects::HousekeepingService::LeaseTaken
def execute
Projects::HousekeepingService.new(project).execute do
Projects::HousekeepingService.new(@project).execute do
garbage_refs.each(&rugged.references.method(:delete))
end
end
......@@ -37,7 +35,7 @@ module Projects
end
def rugged
@rugged ||= project.repository.rugged
@rugged ||= @project.repository.rugged
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment