Class: Osm::Email::DeliveryReport::Email
- Defined in:
- lib/osm/email.rb
Constant Summary collapse
- SORT_BY =
[:subject, :from, :to]
Instance Attribute Summary collapse
-
#body ⇒ String
The body of the email.
-
#from ⇒ String
Who the email was sent from.
-
#subject ⇒ String
The subject of the email.
-
#to ⇒ String
Who the email was sent to (possibly nil).
Instance Method Summary collapse
-
#initialize ⇒ Object
constructor
Initialize a new DeliveryReport::Email.
- #to_s ⇒ Object
Methods inherited from Model
#<, #<=, #<=>, #>, #>=, #between?, #changed_attributes, configure, #reset_changed_attributes, #to_i
Constructor Details
#initialize ⇒ Object
Initialize a new DeliveryReport::Email
|
# File 'lib/osm/email.rb', line 350
|
Instance Attribute Details
#body ⇒ String
Returns the body of the email.
335 |
# File 'lib/osm/email.rb', line 335 attribute :to, type: String |
#from ⇒ String
Returns who the email was sent from.
335 |
# File 'lib/osm/email.rb', line 335 attribute :to, type: String |
#subject ⇒ String
Returns the subject of the email.
335 |
# File 'lib/osm/email.rb', line 335 attribute :to, type: String |
#to ⇒ String
Returns who the email was sent to (possibly nil).
335 |
# File 'lib/osm/email.rb', line 335 attribute :to, type: String |
Instance Method Details
#to_s ⇒ Object
355 356 357 |
# File 'lib/osm/email.rb', line 355 def to_s "To: #{to}\nFrom: #{from}\n\n#{subject}\n\n#{body.gsub(/<\/?[^>]*>/, '')}" end |