Sha256: a6f32231c75ea2a3a898bbfb870824bb02f572c775dd0adbc68de30229101b85
Contents?: true
Size: 307 Bytes
Versions: 12
Compression:
Stored size: 307 Bytes
Contents
class Breadcrumbs < Tags::Tag self.tag_name = :ul def initialize(items) super :id => 'breadcrumbs' @items = items end def content @items[0, @items.size - 1].map { |item| Tags::Li.new(item.content).render }.join + Tags::Li.new(@items.last.text, :class => 'last').render end end
Version data entries
12 entries across 12 versions & 2 rubygems