Class: ModelScope::Reports::LineBase

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

Direct Known Subclasses

Callbacks::Line, Validations::Line

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



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

def generate
  output = [report_title]

  @stats.by_model.each do |model_name, model_callbacks|
    output << "\n#{model_name}:"
    model_callbacks.sort_by(&:kind).each do |callback|
      output << format_callback(callback)
    end
  end

  output.join("\n")
end