No need to map, all? takes a block

This commit is contained in:
Jack Nagel 2013-08-14 12:43:25 -05:00
parent 4d2188cc90
commit 3d39a57118

View File

@ -91,7 +91,7 @@ class PythonInstalled < Requirement
@unsatisfied_because += "Your `python` points to a Python 3.x. This is not supported." @unsatisfied_because += "Your `python` points to a Python 3.x. This is not supported."
false false
else else
@imports.keys.map do |module_name| @imports.keys.all? do |module_name|
if not importable? module_name if not importable? module_name
@unsatisfied_because += "Unsatisfied dependency: #{module_name}\n" @unsatisfied_because += "Unsatisfied dependency: #{module_name}\n"
@unsatisfied_because += "OS X System's " if from_osx? @unsatisfied_because += "OS X System's " if from_osx?
@ -106,7 +106,7 @@ class PythonInstalled < Requirement
else else
true true
end end
end.all? # all given `module_name`s have to be `importable?` end
end end
end end