null+****@clear*****
null+****@clear*****
Sat Jun 2 11:05:50 JST 2012
SHIMADA Koji 2012-06-02 11:05:50 +0900 (Sat, 02 Jun 2012) New Revision: 79c15ec9127d7e3f5ce1af710f2be93be3b8a187 Log: Extract Logaling::Command::Application#build_note_string Modified files: lib/logaling/command/application.rb Modified: lib/logaling/command/application.rb (+6 -2) =================================================================== --- lib/logaling/command/application.rb 2012-06-02 11:02:10 +0900 (06973e9) +++ lib/logaling/command/application.rb 2012-06-02 11:05:50 +0900 (9ea0d56) @@ -239,9 +239,9 @@ module Logaling::Command terms.each_with_index do |term, i| source_string = extract_keyword_and_coloring(term[:snipped_source_term], term[:source_term]) target_string = extract_keyword_and_coloring(term[:snipped_target_term], term[:target_term]) - note = term[:note].to_s unless term[:note].empty? + note_string = build_note_string(term[:note]) glossary_name_string = build_glossary_name_string(term[:glossary_name], @repository, @config) - printer(source_string, target_string, note, + printer(source_string, target_string, note_string, glossary_name_string, max_str_size, i, terms.length) end else @@ -357,6 +357,10 @@ module Logaling::Command glossary_name_string end + def build_note_string(note) + note.to_s unless note.empty? + end + def extract_keyword_and_coloring(snipped_term, term) return term if snipped_term.empty? || options["no-color"] display_string = snipped_term.map do |word|