Kouhei Sutou
null+****@clear*****
Sun Jan 5 14:53:35 JST 2014
Kouhei Sutou 2014-01-05 14:53:35 +0900 (Sun, 05 Jan 2014) New Revision: fa6e4faba2e5f7e8e799d7670766e4b9861d60f0 https://github.com/ranguba/chupa-text/commit/fa6e4faba2e5f7e8e799d7670766e4b9861d60f0 Message: Use InputData Modified files: lib/chupa-text/extractor.rb Modified: lib/chupa-text/extractor.rb (+3 -6) =================================================================== --- lib/chupa-text/extractor.rb 2014-01-05 14:49:15 +0900 (5c139ad) +++ lib/chupa-text/extractor.rb 2014-01-05 14:53:35 +0900 (8e5cab5) @@ -72,13 +72,10 @@ module ChupaText private def ensure_data(input) - case input - when String, Pathname, URI::Generic - data = Data.new - data.uri = input.to_s - data - else + if input.is_a?(Data) input + else + InputData.new(input) end end -------------- next part -------------- HTML����������������������������...Download