class SushiNet::StoreItemList < Borges::Component

  def choose(item)
    call SushiNet::StoreItemView.new(item)
  end

  def initialize(items)
    @batcher = Borges::BatchedList.new items, 8
  end

  def render_content_on(r)
    r.list_do @batcher.batch do |item|
      r.anchor item.title do choose item end
    end

    r.render @batcher
  end

end # class SushiNet::StoreItemList

