Yoji Shidara
null+****@clear*****
Wed Jan 15 20:02:20 JST 2014
Yoji Shidara 2014-01-15 20:02:20 +0900 (Wed, 15 Jan 2014) New Revision: 039d3aece760dcdaf45c2bdee0559066f6a8e753 https://github.com/droonga/fluent-plugin-droonga/commit/039d3aece760dcdaf45c2bdee0559066f6a8e753 Message: Extract output_target_attributes method Modified files: lib/droonga/searcher.rb Modified: lib/droonga/searcher.rb (+7 -4) =================================================================== --- lib/droonga/searcher.rb 2014-01-15 18:08:46 +0900 (08ccf61) +++ lib/droonga/searcher.rb 2014-01-15 20:02:20 +0900 (cb6622f) @@ -427,22 +427,25 @@ module Droonga attributes end + def output_target_attributes + attributes =****@reque*****["attributes"] + normalize_target_attributes(attributes) + end + def format_records params =****@reque***** - attributes = params["attributes"] - target_attributes = normalize_target_attributes(attributes) offset = params["offset"] || 0 limit = params["limit"] || 10 formatted_records = nil @result.records.open_cursor(:offset => offset, :limit => limit) do |cursor| if****@reque*****_output? formatted_records = cursor.collect do |record| - complex_record(target_attributes, record) + complex_record(output_target_attributes, record) end else formatted_records = cursor.collect do |record| - simple_record(target_attributes, record) + simple_record(output_target_attributes, record) end end end -------------- next part -------------- HTML����������������������������... Download