Kouhei Sutou
null+****@clear*****
Mon Jun 18 18:04:00 JST 2018
Kouhei Sutou 2018-06-18 18:04:00 +0900 (Mon, 18 Jun 2018) New Revision: 52b39da4e57e4544a542c930d3f9bcf59b64085d https://github.com/ranguba/chupa-text/commit/52b39da4e57e4544a542c930d3f9bcf59b64085d Message: Improve input source detection Modified files: lib/chupa-text/input-data.rb Modified: lib/chupa-text/input-data.rb (+4 -3) =================================================================== --- lib/chupa-text/input-data.rb 2017-12-13 12:31:01 +0900 (9946cd0) +++ lib/chupa-text/input-data.rb 2018-06-18 18:04:00 +0900 (94623a8) @@ -23,11 +23,12 @@ module ChupaText def initialize(uri, options={}) super(options) self.uri = uri - if****@uri***** == URI::Generic - @content = FileContent.new(path) - else + case @uri + when URI::HTTP, URI::FTP @content = download self.path =****@conte***** + else + @content = FileContent.new(path) end end -------------- next part -------------- HTML����������������������������... URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20180618/27177f29/attachment.htm