Class: MailxRuby::Body
- Inherits:
-
Object
- Object
- MailxRuby::Body
- Extended by:
- Forwardable
- Defined in:
- lib/mailx_ruby/body.rb
Instance Attribute Summary collapse
-
#html ⇒ Object
(also: #text)
Returns the value of attribute html.
Instance Method Summary collapse
- #has_css? ⇒ Boolean
-
#initialize(html) ⇒ Body
constructor
A new instance of Body.
- #premailer ⇒ Object
Constructor Details
#initialize(html) ⇒ Body
9 10 11 |
# File 'lib/mailx_ruby/body.rb', line 9 def initialize(html) @html = html end |
Instance Attribute Details
#html ⇒ Object Also known as: text
Returns the value of attribute html.
6 7 8 |
# File 'lib/mailx_ruby/body.rb', line 6 def html @html end |
Instance Method Details
#has_css? ⇒ Boolean
13 14 15 |
# File 'lib/mailx_ruby/body.rb', line 13 def has_css? nokogiri_html.xpath("//style").any? end |
#premailer ⇒ Object
17 18 19 |
# File 'lib/mailx_ruby/body.rb', line 17 def premailer @premailer ||= generate_premailer end |