Class: RailsERD::Diagram::Tbls
- Inherits:
-
Diagram
- Object
- Diagram
- RailsERD::Diagram::Tbls
- Defined in:
- lib/rails_erd/diagram/tbls.rb
Overview
Emits a JSON description of the domain in the tbls schema format
(https://github.com/k1LoW/tbls). Consumable by any tbls-compatible tool —
for example Liam ERD: liam erd build --input erd.json --format tbls.
Unlike a schema.rb dump, this reflects the relationships rails-erd derives
from ActiveRecord — including FKs that exist only as belongs_to
associations and not as DB-level constraints.
Instance Attribute Summary collapse
-
#tables_by_name ⇒ Object
Returns the value of attribute tables_by_name.
Instance Method Summary collapse
Instance Attribute Details
#tables_by_name ⇒ Object
Returns the value of attribute tables_by_name.
16 17 18 |
# File 'lib/rails_erd/diagram/tbls.rb', line 16 def tables_by_name @tables_by_name end |
Instance Method Details
#filename ⇒ Object
48 49 50 |
# File 'lib/rails_erd/diagram/tbls.rb', line 48 def filename "#{.filename}.json" end |