Class: ActiveRecord::Schema
- Inherits:
-
Object
- Object
- ActiveRecord::Schema
- Defined in:
- lib/schema2plantuml/active_record/schema.rb
Class Method Summary collapse
Instance Method Summary collapse
- #add_foreign_key(child_table_name, parent_table_name, _options = {}) ⇒ Object
- #add_index ⇒ Object
- #create_table(table_name, _options, &block) ⇒ Object
- #create_view ⇒ Object
- #define(&block) ⇒ Object
- #enable_extension ⇒ Object
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, = {}) puts "#{parent_table_name} --o #{child_table_name}" end |
#add_index ⇒ Object
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, , &block) puts "object #{table_name} {" block.call(Table2plantuml.new) puts "}" end |
#create_view ⇒ Object
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_extension ⇒ Object
21 |
# File 'lib/schema2plantuml/active_record/schema.rb', line 21 def enable_extension(*); end |