Sha256: fb148a0145c9185e730cc86ae57457fa40ff6b1e7f5c4bbbd84f669cace6ddc8
Contents?: true
Size: 618 Bytes
Versions: 9
Compression:
Stored size: 618 Bytes
Contents
module Aureus class Listing < Renderable def initialize @entries = Array.new end def entry head, body = nil, &block init_haml_helpers if block_given? @entries << ListingEntry.new(head,capture_haml(&block)) else @entries << ListingEntry.new(head,body) end end def render content_tag "table", compact_render(*@entries), :class => "simple-table" end end class ListingEntry < Renderable def initialize head, body @head = head @body = body end def render content_tag "tr" do compact content_tag("th",@head), content_tag("td",@body) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems