Module: Doterd::Autodraw

Defined in:
lib/doterd.rb

Overview

auto draw erd at the end of current script

Exmaple:

include Doterd::Autodraw

this will also include the default erd dsl

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



13
14
15
16
17
18
19
20
# File 'lib/doterd.rb', line 13

def self.included(base)
  base.send(:include, Doterd::DSL)

  at_exit {
    next if $! and not ($!.kind_of? SystemExit and $!.success?)
    Doterd.viz
  }
end