Kouhei Sutou
null+****@clear*****
Sun Mar 23 17:15:44 JST 2014
Kouhei Sutou 2014-03-23 17:15:44 +0900 (Sun, 23 Mar 2014) New Revision: 3893ad54dd6a288fe0a20b77d5405d86299b08de https://github.com/droonga/fluent-plugin-droonga/commit/3893ad54dd6a288fe0a20b77d5405d86299b08de Message: distributor: use more meaningful name Modified files: lib/droonga/distributor.rb Modified: lib/droonga/distributor.rb (+7 -6) =================================================================== --- lib/droonga/distributor.rb 2014-03-23 17:14:13 +0900 (3642c38) +++ lib/droonga/distributor.rb 2014-03-23 17:15:44 +0900 (888f962) @@ -54,25 +54,26 @@ module Droonga private def build_dependencies + @dependencies = {} @plan.each do |step| - @dependency[step] = step["inputs"] + @dependencies[step] = step["inputs"] next unless step["outputs"] step["outputs"].each do |output| - @dependency[output] = [step] + @dependencies[output] = [step] end end end def tsort_each_node(&block) - @dependency.each_key(&block) + @dependencies.each_key(&block) end def tsort_each_child(node, &block) - if node.is_a? String and @dependency[node].nil? + if node.is_a? String and @dependencies[node].nil? raise UndefinedInputError.new(node) end - if @dependency[node] - @dependency[node].each(&block) + if @dependencies[node] + @dependencies[node].each(&block) end end end -------------- next part -------------- HTML����������������������������...Download