Sha256: 3f09939561dee4cf06b32824d08b0c7f82af330e933319d220e7c28089442ef8

Contents?: true

Size: 407 Bytes

Versions: 1

Compression:

Stored size: 407 Bytes

Contents

require 'item_printer'

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.1 lib/item_list_printer.rb