Class: Aureus::Components::ListingEntry
- Inherits:
-
Renderable
- Object
- Renderable
- Aureus::Components::ListingEntry
- Defined in:
- lib/aureus/components/listing.rb
Instance Method Summary collapse
-
#initialize(head, body) ⇒ ListingEntry
constructor
A new instance of ListingEntry.
- #render ⇒ Object
Methods inherited from Renderable
#compact, #compact_render, #content_tag, #init
Constructor Details
#initialize(head, body) ⇒ ListingEntry
Returns a new instance of ListingEntry.
24 25 26 27 |
# File 'lib/aureus/components/listing.rb', line 24 def initialize(head, body) @head = head @body = body end |
Instance Method Details
#render ⇒ Object
29 30 31 32 33 |
# File 'lib/aureus/components/listing.rb', line 29 def render content_tag 'tr' do compact content_tag('th', @head), content_tag('td', @body) end end |