Sha256: 82623871a4a5634669ed58d8cda59d4f18d8a0495827e241432db187b20175c8

Contents?: true

Size: 170 Bytes

Versions: 16

Compression:

Stored size: 170 Bytes

Contents

require 'tsort'

class Graph < Hash
  include TSort

  alias tsort_each_node each_key

  def tsort_each_child(node, &block)
    fetch(node) { [] }.each(&block)
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
rubrowser-2.11 lib/rubrowser/graph.rb
rubrowser-2.10 lib/rubrowser/graph.rb
rubrowser-2.9.1 lib/rubrowser/graph.rb
rubrowser-2.9.0 lib/rubrowser/graph.rb
rubrowser-2.8.0 lib/rubrowser/graph.rb
rubrowser-2.7.1 lib/rubrowser/graph.rb
rubrowser-2.7.0 lib/rubrowser/graph.rb
rubrowser-2.6.0 lib/rubrowser/graph.rb
rubrowser-2.5.0 lib/rubrowser/graph.rb
rubrowser-2.4.0 lib/rubrowser/graph.rb
rubrowser-2.3.0 lib/rubrowser/graph.rb
rubrowser-2.2.0 lib/rubrowser/graph.rb
rubrowser-2.1.0 lib/rubrowser/graph.rb
rubrowser-2.0.0 lib/rubrowser/graph.rb
rubrowser-0.3.1 lib/rubrowser/graph.rb
rubrowser-0.3.0 lib/rubrowser/graph.rb