| Class | Hash |
| In: |
lib/uttk/logger/to_uttk_log.rb
lib/uttk/strategies/Iterate.rb lib/uttk/strategies/PackageCollection.rb lib/uttk/loaders/Loader.rb |
| Parent: | Object |
| each_key | -> | tsort_each_node |
# File lib/uttk/loaders/Loader.rb, line 138 def testify ( symtbl, &block ) if size == 1 and (tab = to_a[0])[1].is_a? Hash name, doc = tab doc[:name] = name return doc.testify(symtbl, &block) end raise ArgumentError, "nil symtbl" if symtbl.nil? strategy = self[:strategy] || symtbl[:strategy] if strategy.nil? raise ArgumentError, "no strategy for this test (#{inspect})" end Uttk::Loaders.get_class(strategy).new do |t| t.symtbl ||= symtbl block[t] if block t.assign(self) end end
# File lib/uttk/logger/to_uttk_log.rb, line 38 def to_uttk_log ( log ) each do |k, v| next if k == :strategy log[k] = v end end
# File lib/uttk/logger/to_uttk_log.rb, line 45 def to_uttk_log_with_key ( key, log, opts=nil ) if has_key? :strategy opts = (opts || {}).merge(:type => self[:strategy]) end log.new_node key, opts do log << self end end
# File lib/uttk/strategies/PackageCollection.rb, line 56 def tsort_each_child(node, &block) fetch(node).each(&block) end
# File lib/uttk/strategies/PackageCollection.rb, line 60 def tsort_each_from ( node=nil, &block ) return tsort_each(&block) if node.nil? each_strongly_connected_component_from(node) do |component| if component.size == 1 block[component.first] else raise Cyclic, "topological sort failed: #{component.inspect}" end end end
# File lib/uttk/strategies/PackageCollection.rb, line 71 def tsort_from ( node=nil ) return tsort if node.nil? result = [] tsort_each_from(node) { |n| result << n } result end