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

Use single assignment for the conditional

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