[logaling-commit] logaling/logaling-command [refactor-structure] Extract TermDefaultRenderer#note

Back to archive index

null+****@clear***** null+****@clear*****
Sun Jun 3 11:52:33 JST 2012


SHIMADA Koji	2012-06-03 11:52:33 +0900 (Sun, 03 Jun 2012)

  New Revision: 7273a4231a8b4129827f252836821e650746d912

  Log:
    Extract TermDefaultRenderer#note

  Modified files:
    lib/logaling/command/renderers.rb

  Modified: lib/logaling/command/renderers.rb (+6 -1)
===================================================================
--- lib/logaling/command/renderers.rb    2012-06-03 11:50:59 +0900 (8e3a037)
+++ lib/logaling/command/renderers.rb    2012-06-03 11:52:33 +0900 (13f330d)
@@ -65,10 +65,15 @@ module Logaling::Command
         unless note
           format = target_term + "\t" + glossary_name
         else
-          format = target_term + "\t# " + note + "\t" + glossary_name
+          format = target_term + "\t" + note + "\t" + glossary_name
         end
         printf("  %-#{@max_str_size+10}s %s\n", source_term, format)
       end
+
+      def note
+        note_string = super
+        "# #{note_string}" if note_string
+      end
     end
 
     class TermCsvRenderer < TermRenderer




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