Class: DigestEmail::DigestFooter
- Inherits:
-
DigestElement
- Object
- DigestElement
- DigestEmail::DigestFooter
- Defined in:
- lib/digest_email/digest_footer.rb
Instance Attribute Summary collapse
-
#signature ⇒ Object
Returns the value of attribute signature.
-
#sponsors_image ⇒ Object
Returns the value of attribute sponsors_image.
Attributes inherited from DigestElement
Instance Method Summary collapse
-
#initialize(footer) ⇒ DigestFooter
constructor
A new instance of DigestFooter.
- #render ⇒ Object
- #render_sponsors_image ⇒ Object
- #wrap(inner) ⇒ Object
Constructor Details
#initialize(footer) ⇒ DigestFooter
Returns a new instance of DigestFooter.
8 9 10 11 12 |
# File 'lib/digest_email/digest_footer.rb', line 8 def initialize() super() @signature = ["signature"] @sponsors_image = ["sponsors_image"] end |
Instance Attribute Details
#signature ⇒ Object
Returns the value of attribute signature.
6 7 8 |
# File 'lib/digest_email/digest_footer.rb', line 6 def signature @signature end |
#sponsors_image ⇒ Object
Returns the value of attribute sponsors_image.
6 7 8 |
# File 'lib/digest_email/digest_footer.rb', line 6 def sponsors_image @sponsors_image end |
Instance Method Details
#render ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/digest_email/digest_footer.rb', line 14 def render parsed_signature = Maruku.new(@signature).to_html html = [ "<div class=\"digest-email-dot-seperator\"></div>", "<div class=\"digest-email-footer-signature\"><div>#{parsed_signature}</div></div>", render_sponsors_image ] wrap html.join("\n") end |
#render_sponsors_image ⇒ Object
25 26 27 28 29 30 |
# File 'lib/digest_email/digest_footer.rb', line 25 def render_sponsors_image html = ["<div class=\"digest-email-footer-sponsors-image\">"] html << ["<img src=\"#{@sponsors_image}\"/>"] html << ["</div>"] html.join("\n") end |
#wrap(inner) ⇒ Object
32 33 34 |
# File 'lib/digest_email/digest_footer.rb', line 32 def wrap(inner) "<div class=\"digest-email-footer\">#{inner}</div>" end |