lib/chupa-text/input-data.rb in chupa-text-1.1.1 vs lib/chupa-text/input-data.rb in chupa-text-1.1.2

- old
+ new

@@ -21,14 +21,15 @@ module ChupaText class InputData < Data def initialize(uri, options={}) super(options) self.uri = uri - if @uri.class == URI::Generic - @content = FileContent.new(path) - else + case @uri + when URI::HTTP, URI::FTP @content = download self.path = @content.path + else + @content = FileContent.new(path) end end def body @content.body