Parent

Class/Module Index [+]

Quicksearch

Sequel::ToDot

Constants

TO_DOT_OPTIONS

The option keys that should be included in the dot output.

Public Class Methods

new(ds) click to toggle source

Given a Dataset, parse the internal structure to generate a dataset visualization.

# File lib/sequel/extensions/to_dot.rb, line 26
def initialize(ds)
  @i = 0
  @stack = [@i]
  @dot = ["digraph G {", "0 [label=\"self\"];"]
  v(ds, "")
  @dot << "}"
end
output(ds) click to toggle source

Given a Dataset, return a string in dot format that will generate a visualization of the dataset.

# File lib/sequel/extensions/to_dot.rb, line 20
def self.output(ds)
  new(ds).output
end

Public Instance Methods

output() click to toggle source

Output the dataset visualization as a string in dot format.

# File lib/sequel/extensions/to_dot.rb, line 35
def output
  @dot.join("\n")
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.