null+****@clear*****
null+****@clear*****
Thu Apr 26 13:53:24 JST 2012
SUZUKI Miho 2012-04-26 13:53:24 +0900 (Thu, 26 Apr 2012) New Revision: e26a25f62bbdcfdc32a80cb0b32c1466a7396c69 Log: change parameter url to glossary_info (hash) Modified files: lib/logaling/external_glossaries/tmx.rb lib/logaling/external_glossary.rb Modified: lib/logaling/external_glossaries/tmx.rb (+2 -2) =================================================================== --- lib/logaling/external_glossaries/tmx.rb 2012-04-26 13:45:05 +0900 (0b6e3ed) +++ lib/logaling/external_glossaries/tmx.rb 2012-04-26 13:53:24 +0900 (fb5120f) @@ -23,8 +23,8 @@ module Logaling output_format 'csv' private - def convert_to_csv(csv, url) - doc = ::Nokogiri::XML(open(url, "r")) + def convert_to_csv(csv, glossary_info) + doc = ::Nokogiri::XML(open(glossary_info[:url], "r")) tu_nodes = doc.xpath('//tu') tu_nodes.each do |tu| original = "" Modified: lib/logaling/external_glossary.rb (+1 -1) =================================================================== --- lib/logaling/external_glossary.rb 2012-04-26 13:45:05 +0900 (a2d8556) +++ lib/logaling/external_glossary.rb 2012-04-26 13:53:24 +0900 (e418fe3) @@ -73,7 +73,7 @@ class Logaling::ExternalGlossary case output_format when "csv" if glossary_info - convert_to_csv(CSV.new(output), glossary_info[:url]) + convert_to_csv(CSV.new(output), glossary_info) else convert_to_csv(CSV.new(output)) end