Class: BuildDbmlContent
- Inherits:
-
Object
- Object
- BuildDbmlContent
- Defined in:
- lib/schema_to_dbml/build_dbml_content.rb
Instance Method Summary collapse
- #build(converted:) ⇒ Object
-
#initialize(configuration: SchemaToDbml.configuration) ⇒ BuildDbmlContent
constructor
A new instance of BuildDbmlContent.
Constructor Details
#initialize(configuration: SchemaToDbml.configuration) ⇒ BuildDbmlContent
Returns a new instance of BuildDbmlContent.
4 5 6 |
# File 'lib/schema_to_dbml/build_dbml_content.rb', line 4 def initialize(configuration: SchemaToDbml.configuration) @configuration = configuration end |
Instance Method Details
#build(converted:) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/schema_to_dbml/build_dbml_content.rb', line 8 def build(converted:) dbml = [] dbml << project_header dbml << tables_section(converted[:tables]) dbml << relations_section(converted[:relations]) dbml << custom_dbml_content dbml.join("\n\n") end |