Class: DigestEmail::DigestItems
- Inherits:
-
DigestElement
- Object
- DigestElement
- DigestEmail::DigestItems
- Defined in:
- lib/digest_email/digest_items.rb
Instance Attribute Summary
Attributes inherited from DigestElement
Instance Method Summary collapse
-
#initialize(items) ⇒ DigestItems
constructor
A new instance of DigestItems.
- #render ⇒ Object
- #wrap(inner) ⇒ Object
Constructor Details
#initialize(items) ⇒ DigestItems
Returns a new instance of DigestItems.
12 13 14 15 |
# File 'lib/digest_email/digest_items.rb', line 12 def initialize(items) super() @children = items end |
Instance Method Details
#render ⇒ Object
17 18 19 20 |
# File 'lib/digest_email/digest_items.rb', line 17 def render rendered_items = @children.map(&:render) wrap rendered_items.join "\n<div class=\"digest-email-dot-seperator\"></div>\n" end |
#wrap(inner) ⇒ Object
22 23 24 |
# File 'lib/digest_email/digest_items.rb', line 22 def wrap(inner) "<div class=\"digest-email-items\">#{inner}</div>" end |