Class: MailxRuby::Body

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/mailx_ruby/body.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#htmlObject 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

#premailerObject



17
18
19
# File 'lib/mailx_ruby/body.rb', line 17

def premailer
  @premailer ||= generate_premailer
end