Class: LetterThief::EmailMessage

Inherits:
ApplicationRecord show all
Defined in:
app/models/letter_thief/email_message.rb

Instance Method Summary collapse

Instance Method Details

#multipart?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'app/models/letter_thief/email_message.rb', line 26

def multipart?
  body_text.present? && body_html.present?
end

#rich?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'app/models/letter_thief/email_message.rb', line 22

def rich?
  type == "rich"
end

#typeObject



18
19
20
# File 'app/models/letter_thief/email_message.rb', line 18

def type
  /html/.match?(content_type) ? "rich" : "plain"
end