Class: Effective::EmailReview
- Inherits:
-
Object
- Object
- Effective::EmailReview
- Includes:
- ActiveModel::Model
- Defined in:
- app/models/effective/email_review.rb
Instance Attribute Summary collapse
-
#bcc ⇒ Object
Returns the value of attribute bcc.
-
#body ⇒ Object
Returns the value of attribute body.
-
#cc ⇒ Object
Returns the value of attribute cc.
-
#email_template ⇒ Object
Returns the value of attribute email_template.
-
#from ⇒ Object
Returns the value of attribute from.
-
#subject ⇒ Object
Returns the value of attribute subject.
-
#template_name ⇒ Object
Returns the value of attribute template_name.
Class Method Summary collapse
Instance Attribute Details
#bcc ⇒ Object
Returns the value of attribute bcc.
12 13 14 |
# File 'app/models/effective/email_review.rb', line 12 def bcc @bcc end |
#body ⇒ Object
Returns the value of attribute body.
8 9 10 |
# File 'app/models/effective/email_review.rb', line 8 def body @body end |
#cc ⇒ Object
Returns the value of attribute cc.
11 12 13 |
# File 'app/models/effective/email_review.rb', line 11 def cc @cc end |
#email_template ⇒ Object
Returns the value of attribute email_template.
5 6 7 |
# File 'app/models/effective/email_review.rb', line 5 def email_template @email_template end |
#from ⇒ Object
Returns the value of attribute from.
10 11 12 |
# File 'app/models/effective/email_review.rb', line 10 def from @from end |
#subject ⇒ Object
Returns the value of attribute subject.
9 10 11 |
# File 'app/models/effective/email_review.rb', line 9 def subject @subject end |
#template_name ⇒ Object
Returns the value of attribute template_name.
6 7 8 |
# File 'app/models/effective/email_review.rb', line 6 def template_name @template_name end |
Class Method Details
.build(attributes = {}) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'app/models/effective/email_review.rb', line 14 def self.build(attributes = {}) email_review = new(attributes) template = email_review.email_template if template.present? email_review.body ||= template.body email_review.subject ||= template.subject email_review.from ||= template.from email_review.cc ||= template.cc email_review.bcc ||= template.bcc email_review.template_name ||= template.template_name end email_review end |