null+****@clear*****
null+****@clear*****
Fri Jul 20 01:13:28 JST 2012
SHIMADA Koji 2012-07-20 01:13:28 +0900 (Fri, 20 Jul 2012) New Revision: edd0e83f95ce0abbe191d319041c2ec0359624cb https://github.com/logaling/logaling-command/commit/edd0e83f95ce0abbe191d319041c2ec0359624cb Log: Extract TermDefaultRenderer#padded_source_term Modified files: lib/logaling/command/renderers.rb Modified: lib/logaling/command/renderers.rb (+5 -2) =================================================================== --- lib/logaling/command/renderers.rb 2012-07-20 01:08:58 +0900 (24a2677) +++ lib/logaling/command/renderers.rb 2012-07-20 01:13:28 +0900 (8101714) @@ -88,8 +88,7 @@ module Logaling::Command def render(output) format = [target_term.strip, note, glossary_name].compact.join("\t") - paddinged_source_term = TermDefaultRenderer.padding_print_size(@term[:source_term], source_term, @max_str_size) - output.printf(" %s %s\n", paddinged_source_term, format) + output.printf(" %s %s\n", padded_source_term, format) end def glossary_name @@ -109,6 +108,10 @@ module Logaling::Command "# #{note_string}" if note_string end + def padded_source_term + TermDefaultRenderer.padding_print_size(@term[:source_term], source_term, @max_str_size) + end + def hide_glossary_name @render_option[:show_glossary] = false end -------------- next part -------------- An HTML attachment was scrubbed... 다운로드