Class: BootstrapEmail::Rails::MailBuilder
- Inherits:
-
Object
- Object
- BootstrapEmail::Rails::MailBuilder
- Defined in:
- lib/bootstrap-email/rails/mail_builder.rb
Instance Attribute Summary collapse
-
#bootstrap_email ⇒ Object
readonly
Returns the value of attribute bootstrap_email.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(mail) ⇒ MailBuilder
constructor
A new instance of MailBuilder.
- #perform ⇒ Object
Constructor Details
#initialize(mail) ⇒ MailBuilder
Returns a new instance of MailBuilder.
12 13 14 15 |
# File 'lib/bootstrap-email/rails/mail_builder.rb', line 12 def initialize(mail) @message = mail @bootstrap_email = BootstrapEmail::Compiler.new(html_part.decoded, type: :string) end |
Instance Attribute Details
#bootstrap_email ⇒ Object (readonly)
Returns the value of attribute bootstrap_email.
6 7 8 |
# File 'lib/bootstrap-email/rails/mail_builder.rb', line 6 def bootstrap_email @bootstrap_email end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
6 7 8 |
# File 'lib/bootstrap-email/rails/mail_builder.rb', line 6 def @message end |
Class Method Details
.perform(mail) ⇒ Object
8 9 10 |
# File 'lib/bootstrap-email/rails/mail_builder.rb', line 8 def self.perform(mail) new(mail).perform if mail end |
Instance Method Details
#perform ⇒ Object
17 18 19 20 |
# File 'lib/bootstrap-email/rails/mail_builder.rb', line 17 def perform replace_html_part(generate_html_part_replacement) end |