Class: AsciiDataTools::RecordTypesConfigurationPrinter

Inherits:
Object
  • Object
show all
Defined in:
lib/ascii-data-tools/configuration_printer.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(presenter) ⇒ RecordTypesConfigurationPrinter

Returns a new instance of RecordTypesConfigurationPrinter.



5
6
7
# File 'lib/ascii-data-tools/configuration_printer.rb', line 5

def initialize(presenter)
  @presenter = presenter
end

Class Method Details

.for_record_types(record_types) ⇒ Object



17
18
19
# File 'lib/ascii-data-tools/configuration_printer.rb', line 17

def for_record_types(record_types)
  new(RecordTypesConfigurationPresenter.new(record_types))
end

Instance Method Details

#summaryObject



9
10
11
12
13
14
# File 'lib/ascii-data-tools/configuration_printer.rb', line 9

def summary
  table do |t|
    t.headings = @presenter.headings
    @presenter.record_type_summaries.each {|summary| t << summary}
  end.to_s
end