DownloadStrategy: Detect classes

This commit is contained in:
Misty De Meo 2012-07-06 11:54:15 -05:00
parent 44ccd122c2
commit f39d8eb88c

View File

@ -578,9 +578,9 @@ class DownloadStrategyDetector
end end
def detect def detect
case @strategy if @strategy.is_a? Class and @strategy.ancestors.include? AbstractDownloadStrategy
when AbstractDownloadStrategy then @strategy @strategy
when Symbol then detect_from_symbol elsif @strategy.is_a? Symbol then detect_from_symbol
else detect_from_url else detect_from_url
end end
end end