[logaling-commit] logaling/logaling-command [use-dump-glossary-source] Use #dump_glossary_source instead of FileUtils.touch

Back to archive index

null+****@clear***** null+****@clear*****
Thu Jul 12 10:16:00 JST 2012


SHIMADA Koji	2012-07-12 10:16:00 +0900 (Thu, 12 Jul 2012)

  New Revision: 4d222cc22254b9f1a3cbb1834d138ce30384427c
  https://github.com/logaling/logaling-command/commit/4d222cc22254b9f1a3cbb1834d138ce30384427c

  Log:
    Use #dump_glossary_source instead of FileUtils.touch
    
    when creating empty glossary source

  Modified files:
    lib/logaling/glossary_sources/glossary_yaml_source.rb

  Modified: lib/logaling/glossary_sources/glossary_yaml_source.rb (+1 -1)
===================================================================
--- lib/logaling/glossary_sources/glossary_yaml_source.rb    2012-07-10 09:05:43 +0900 (84ddffc)
+++ lib/logaling/glossary_sources/glossary_yaml_source.rb    2012-07-12 10:16:00 +0900 (5ef800d)
@@ -34,7 +34,7 @@ module Logaling::GlossarySources
     end
 
     def add(source_term, target_term, note)
-      FileUtils.touch(source_path) unless File.exist?(source_path)
+      dump_glossary_source([]) unless File.exist?(source_path)
 
       glossary_source = self.load
       glossary_source << build_term(source_term, target_term, note)
-------------- next part --------------
An HTML attachment was scrubbed...
다운로드 



More information about the logaling-commit mailing list
Back to archive index