Class: ActiveRecord::Schema

Inherits:
Object
  • Object
show all
Defined in:
lib/schema2plantuml/active_record/schema.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.define(_info, &block) ⇒ Object



3
4
5
# File 'lib/schema2plantuml/active_record/schema.rb', line 3

def self.define(_info, &block)
  new.define(&block)
end

Instance Method Details

#add_foreign_key(child_table_name, parent_table_name, _options = {}) ⇒ Object



17
18
19
# File 'lib/schema2plantuml/active_record/schema.rb', line 17

def add_foreign_key(child_table_name, parent_table_name, _options = {})
  puts "#{parent_table_name} --o #{child_table_name}"
end

#add_indexObject



22
# File 'lib/schema2plantuml/active_record/schema.rb', line 22

def add_index(*); end

#create_table(table_name, _options, &block) ⇒ Object



11
12
13
14
15
# File 'lib/schema2plantuml/active_record/schema.rb', line 11

def create_table(table_name, _options, &block)
  puts "object #{table_name} {"
  block.call(Table2plantuml.new)
  puts "}"
end

#create_viewObject



23
# File 'lib/schema2plantuml/active_record/schema.rb', line 23

def create_view(*); end

#define(&block) ⇒ Object



7
8
9
# File 'lib/schema2plantuml/active_record/schema.rb', line 7

def define(&block)
  instance_eval(&block)
end

#enable_extensionObject



21
# File 'lib/schema2plantuml/active_record/schema.rb', line 21

def enable_extension(*); end