Kouhei Sutou
null+****@clear*****
Tue Jul 15 23:18:57 JST 2014
Kouhei Sutou 2014-07-15 23:18:57 +0900 (Tue, 15 Jul 2014) New Revision: 271f53ebbfb13cdf9a9913be0322aea9758ea236 https://github.com/droonga/droonga-engine/commit/271f53ebbfb13cdf9a9913be0322aea9758ea236 Message: Use more meaningful name value -> column_value one_record_value -> format_column_value Modified files: lib/droonga/searcher.rb Modified: lib/droonga/searcher.rb (+8 -8) =================================================================== --- lib/droonga/searcher.rb 2014-07-15 23:15:16 +0900 (de1f394) +++ lib/droonga/searcher.rb 2014-07-15 23:18:57 +0900 (94e8ed9) @@ -547,22 +547,22 @@ module Droonga variable.value = record expression.execute else - value = record[attribute[:source]] - one_record_value(value) + column_value = record[attribute[:source]] + format_column_value(column_value) end end end - def one_record_value(value) - case value + def format_column_value(column_value) + case column_value when Groonga::Record - value.record_id + column_value.record_id when Array - value.collect do |one_value| - one_record_value(one_value) + column_value.collect do |sub_column_value| + format_column_value(sub_column_value) end else - value + column_value end end -------------- next part -------------- HTML����������������������������... 下載