Kouhei Sutou
null+****@clear*****
Tue Apr 8 17:43:40 JST 2014
Kouhei Sutou 2014-04-08 17:43:40 +0900 (Tue, 08 Apr 2014) New Revision: 7949ddbd0126f80a38628cb874556296ab3e283c https://github.com/droonga/fluent-plugin-droonga/commit/7949ddbd0126f80a38628cb874556296ab3e283c Message: Simplify We can know about the formatter is what formatter in the small methods. Modified files: lib/droonga/searcher.rb Modified: lib/droonga/searcher.rb (+6 -11) =================================================================== --- lib/droonga/searcher.rb 2014-04-08 17:42:23 +0900 (25f44a3) +++ lib/droonga/searcher.rb 2014-04-08 17:43:40 +0900 (65a7937) @@ -622,16 +622,12 @@ module Droonga end def format_attributes - attributes_formatter = nil if****@reque*****_output? - attributes_formatter = ComplexAttributesFormatter.new + formatter = ComplexAttributesFormatter.new else - attributes_formatter = SimpleAttributesFormatter.new + formatter = SimpleAttributesFormatter.new end - attributes_formatter.format_attributes( - output_target_attributes, - @result.records - ) + formatter.format_attributes(output_target_attributes, @result.records) end def output_target_attributes @@ -640,13 +636,12 @@ module Droonga end def format_records - records_formatter = nil if****@reque*****_output? - records_formatter = ComplexRecordsFormatter.new + formatter = ComplexRecordsFormatter.new else - records_formatter = SimpleRecordsFormatter.new + formatter = SimpleRecordsFormatter.new end - records_formatter.format_records(output_target_attributes, @result.records, output_limit, output_offset) + formatter.format_records(output_target_attributes, @result.records, output_limit, output_offset) end def normalize_target_attributes(attributes, domain =****@resul*****) -------------- next part -------------- HTML����������������������������...Download