Commit 000b7238 authored by Boris Bügling's avatar Boris Bügling

Use single assignment for the conditional

parent bfa0dbf6
......@@ -34,14 +34,14 @@ module Pod
# @todo add UI.print and enable print statements again.
#
def run
if @name
sources = if @name
if File.exist?(@name)
sources = [Pathname.new(@name)]
[Pathname.new(@name)]
else
sources = SourcesManager.sources([@name]).map(&:repo)
SourcesManager.sources([@name]).map(&:repo)
end
else
sources = SourcesManager.aggregate.sources.map(&:repo)
SourcesManager.aggregate.sources.map(&:repo)
end
sources.each do |source|
......
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