Module: RailsERD

Defined in:
lib/rails_erd.rb,
lib/rails_erd/cli.rb,
lib/rails_erd/config.rb,
lib/rails_erd/domain.rb,
lib/rails_erd/diagram.rb,
lib/rails_erd/railtie.rb,
lib/rails_erd/version.rb,
lib/rails_erd/domain/entity.rb,
lib/rails_erd/diagram/graphviz.rb,
lib/rails_erd/domain/attribute.rb,
lib/rails_erd/domain/relationship.rb,
lib/rails_erd/domain/specialization.rb,
lib/rails_erd/domain/relationship/cardinality.rb

Overview

Defined Under Namespace

Modules: Inspectable Classes: CLI, Config, Diagram, Domain, Railtie

Constant Summary collapse

VERSION =
"1.7.1"
"RailsERD #{VERSION}"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.optionsObject

Access to default options. Any instance of RailsERD::Domain and RailsERD::Diagram will use these options unless overridden.


35
36
37
# File 'lib/rails_erd.rb', line 35

def options
  @options
end

Class Method Details

.default_optionsObject


37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/rails_erd.rb', line 37

def default_options
  ActiveSupport::OrderedOptions[
    :attributes, :content,
    :disconnected, true,
    :filename, "erd",
    :filetype, :pdf,
    :fonts, {},
    :indirect, true,
    :inheritance, false,
    :markup, true,
    :notation, :simple,
    :orientation, :horizontal,
    :polymorphism, false,
    :sort, true,
    :warn, true,
    :title, true,
    :exclude, nil,
    :only, nil,
    :only_recursion_depth, nil,
    :prepend_primary, false,
    :cluster, false,
  ]
end

.load_tasksObject


64
65
66
67
68
69
# File 'lib/rails_erd.rb', line 64

def load_tasks
  return if(self.loaded_tasks)
  self.loaded_tasks = true

  Dir[File.join(File.dirname(__FILE__), 'tasks', '**/*.rake')].each { |rake| load rake }
end

.loaded_tasksObject


62
# File 'lib/rails_erd.rb', line 62

def loaded_tasks; return @loaded_tasks; end

.loaded_tasks=(val) ⇒ Object


61
# File 'lib/rails_erd.rb', line 61

def loaded_tasks=(val); @loaded_tasks = val; end