Class: ModelScope::Reports::TableBase

Inherits:
Base
  • Object
show all
Defined in:
lib/modelscope/reports/table_base.rb

Direct Known Subclasses

Callbacks::Table, Validations::Table

Instance Attribute Summary

Attributes inherited from Base

#callbacks

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from ModelScope::Reports::Base

Instance Method Details

#generateObject



8
9
10
11
12
13
14
15
16
# File 'lib/modelscope/reports/table_base.rb', line 8

def generate
  table = Terminal::Table.new do |t|
    t.title = report_title
    t.headings = ["Model", "Kind", "Total", "Own", "Inherited", "Rails", "Associations", "Attributes", "Gems", "Conditional"]
    t.rows = generate_rows
  end

  table.to_s
end