Sha256: a051d2b3b97ecfbaffa2f0881474cb471688c0778fc083d7068dac1615b54cc6

Contents?: true

Size: 446 Bytes

Versions: 1

Compression:

Stored size: 446 Bytes

Contents

require 'item_printer'

# ItemListPrinter
module ItemListPrinter
  def self.to_string(items, item_printer = ItemPrinter)
    items.each_with_index
         .map { |item, index| item_printer.to_string(item, index + 1) }
         .join("\n")
  end

  def self.to_summary(items, keys, item_printer = ItemPrinter)
    items.each_with_index
         .map { |item, index| item_printer.to_summary(item, keys, index + 1) }
         .join("\n")
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
item_list-0.1.2 lib/item_list_printer.rb