Skip to content

Instantly share code, notes, and snippets.

@abachman
Created March 10, 2009 21:15
Show Gist options
  • Save abachman/77141 to your computer and use it in GitHub Desktop.
Save abachman/77141 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'railroad/models_diagram'
require 'railroad/options_struct'
options = OptionsStruct.new
options.parse = ['--verbose']
mod = ModelsDiagram.new options
mod.generate
mod.graph.nodes.each do |node|
puts "Node ==========================="
puts node[1]
end
mod.graph.edges.each do |edge|
printf "%s to %s, %s\n", edge[1], edge[2], edge[0]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment