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
def detect
case @strategy
when AbstractDownloadStrategy then @strategy
when Symbol then detect_from_symbol
if @strategy.is_a? Class and @strategy.ancestors.include? AbstractDownloadStrategy
@strategy
elsif @strategy.is_a? Symbol then detect_from_symbol
else detect_from_url
end
end