Class: DigestEmail::DigestElement
- Inherits:
-
Object
- Object
- DigestEmail::DigestElement
- Defined in:
- lib/digest_email/digest_element.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#children ⇒ Object
Returns the value of attribute children.
Instance Method Summary collapse
-
#initialize ⇒ DigestElement
constructor
A new instance of DigestElement.
-
#render ⇒ Object
Render each child, join all the html and wrap it.
-
#wrap(inner) ⇒ Object
By default don’t wrap with anything.
Constructor Details
#initialize ⇒ DigestElement
Returns a new instance of DigestElement.
7 8 9 |
# File 'lib/digest_email/digest_element.rb', line 7 def initialize @children = [] end |
Instance Attribute Details
#children ⇒ Object
Returns the value of attribute children.
5 6 7 |
# File 'lib/digest_email/digest_element.rb', line 5 def children @children end |
Instance Method Details
#render ⇒ Object
Render each child, join all the html and wrap it
12 13 14 |
# File 'lib/digest_email/digest_element.rb', line 12 def render wrap @children.map(&:render).join("\n") end |
#wrap(inner) ⇒ Object
By default don’t wrap with anything
17 18 19 |
# File 'lib/digest_email/digest_element.rb', line 17 def wrap(inner) inner end |