class Aureus::Components::Listing
Public Class Methods
new() { |self| ... }
click to toggle source
# File lib/aureus/components/listing.rb, line 4 def initialize @entries = Array.new yield(self) end
Public Instance Methods
entry(head, body = nil, &block)
click to toggle source
# File lib/aureus/components/listing.rb, line 9 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
render()
click to toggle source
# File lib/aureus/components/listing.rb, line 18 def render content_tag 'table', compact_render(*@entries), class: 'aureus-simple-table' end