class Dump::Reader::Summary

Helper class for building summary of dump

Attributes

text[R]
to_s[R]

Public Class Methods

new() click to toggle source
# File lib/dump/reader.rb, line 33
def initialize
  @text = ''.dup
end
pluralize(count, singular) click to toggle source

from ActionView::Helpers::TextHelper

# File lib/dump/reader.rb, line 48
def self.pluralize(count, singular)
  "#{count} #{count == 1 ? singular : singular.pluralize}"
end

Public Instance Methods

data(entries) click to toggle source
# File lib/dump/reader.rb, line 41
def data(entries)
  entries.each do |entry|
    @text << "    #{entry}\n"
  end
end
header(header) click to toggle source
# File lib/dump/reader.rb, line 37
def header(header)
  @text << "  #{header}:\n"
end