Class: WatirmarkEmail::Email
- Inherits:
-
Object
- Object
- WatirmarkEmail::Email
- Defined in:
- lib/watirmark_email/email_collection.rb
Instance Attribute Summary collapse
-
#body_raw ⇒ Object
Returns the value of attribute body_raw.
-
#body_text ⇒ Object
Returns the value of attribute body_text.
-
#date ⇒ Object
Returns the value of attribute date.
-
#from ⇒ Object
Returns the value of attribute from.
-
#message_id ⇒ Object
Returns the value of attribute message_id.
-
#subject ⇒ Object
Returns the value of attribute subject.
-
#to ⇒ Object
Returns the value of attribute to.
-
#uid ⇒ Object
Returns the value of attribute uid.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#initialize(envelope, body_text, body_raw, uid) ⇒ Email
constructor
A new instance of Email.
Constructor Details
#initialize(envelope, body_text, body_raw, uid) ⇒ Email
Returns a new instance of Email.
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/watirmark_email/email_collection.rb', line 5 def initialize(envelope, body_text, body_raw, uid) @to = [] @date = envelope.date @subject = envelope.subject envelope.to.each do |recipient| @to << "#{recipient.mailbox}@#{recipient.host}" end @from = "#{envelope.from.first.mailbox}@#{envelope.from.first.host}" = envelope. @body_text = body_text @body_raw = body_raw @uid = uid end |
Instance Attribute Details
#body_raw ⇒ Object
Returns the value of attribute body_raw.
3 4 5 |
# File 'lib/watirmark_email/email_collection.rb', line 3 def body_raw @body_raw end |
#body_text ⇒ Object
Returns the value of attribute body_text.
3 4 5 |
# File 'lib/watirmark_email/email_collection.rb', line 3 def body_text @body_text end |
#date ⇒ Object
Returns the value of attribute date.
3 4 5 |
# File 'lib/watirmark_email/email_collection.rb', line 3 def date @date end |
#from ⇒ Object
Returns the value of attribute from.
3 4 5 |
# File 'lib/watirmark_email/email_collection.rb', line 3 def from @from end |
#message_id ⇒ Object
Returns the value of attribute message_id.
3 4 5 |
# File 'lib/watirmark_email/email_collection.rb', line 3 def end |
#subject ⇒ Object
Returns the value of attribute subject.
3 4 5 |
# File 'lib/watirmark_email/email_collection.rb', line 3 def subject @subject end |
#to ⇒ Object
Returns the value of attribute to.
3 4 5 |
# File 'lib/watirmark_email/email_collection.rb', line 3 def to @to end |
#uid ⇒ Object
Returns the value of attribute uid.
3 4 5 |
# File 'lib/watirmark_email/email_collection.rb', line 3 def uid @uid end |
Instance Method Details
#<=>(other) ⇒ Object
19 20 21 |
# File 'lib/watirmark_email/email_collection.rb', line 19 def <=> (other) date <=> other.date end |