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

Just use @project directly

parent bea29327
...@@ -11,15 +11,13 @@ module Projects ...@@ -11,15 +11,13 @@ module Projects
%r{\Arefs/(?:#{names})/} %r{\Arefs/(?:#{names})/}
end end
attr_reader :project
def initialize(project) def initialize(project)
@project = project @project = project
end end
# This could raise Projects::HousekeepingService::LeaseTaken # This could raise Projects::HousekeepingService::LeaseTaken
def execute def execute
Projects::HousekeepingService.new(project).execute do Projects::HousekeepingService.new(@project).execute do
garbage_refs.each(&rugged.references.method(:delete)) garbage_refs.each(&rugged.references.method(:delete))
end end
end end
...@@ -37,7 +35,7 @@ module Projects ...@@ -37,7 +35,7 @@ module Projects
end end
def rugged def rugged
@rugged ||= project.repository.rugged @rugged ||= @project.repository.rugged
end end
end 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