Yoji Shidara
null+****@clear*****
Thu Jan 23 10:47:28 JST 2014
Yoji Shidara 2014-01-23 10:47:28 +0900 (Thu, 23 Jan 2014) New Revision: bbf1a1bae5dadb90e169fef304e90f3d8bb02010 https://github.com/droonga/fluent-plugin-droonga/commit/bbf1a1bae5dadb90e169fef304e90f3d8bb02010 Merged 1ab6677: Merge branch 'output-attributes' Message: Switch formats by switching formatter Modified files: lib/droonga/searcher.rb Modified: lib/droonga/searcher.rb (+4 -12) =================================================================== --- lib/droonga/searcher.rb 2014-01-23 10:44:13 +0900 (68174ad) +++ lib/droonga/searcher.rb 2014-01-23 10:47:28 +0900 (5cd93a5) @@ -489,11 +489,13 @@ module Droonga end def format_attributes + attributes_formatter = nil if****@reque*****_output? - format_attributes_complex(output_target_attributes) + attributes_formatter = ComplexAttributesFormatter.new else - format_attributes_simple(output_target_attributes) + attributes_formatter = SimpleAttributesFormatter.new end + attributes_formatter.format(output_target_attributes, @result.records) end def output_target_attributes @@ -501,16 +503,6 @@ module Droonga normalize_target_attributes(attributes) end - def format_attributes_simple(attributes) - formatter = SimpleAttributesFormatter.new - formatter.format(attributes, @result.records) - end - - def format_attributes_complex(attributes) - formatter = ComplexAttributesFormatter.new - formatter.format(attributes, @result.records) - end - def format_records formatted_records = nil cursor_options = { -------------- next part -------------- HTML����������������������������... Download