Class: Rounders::Mail
- Inherits:
-
Object
- Object
- Rounders::Mail
- Extended by:
- Forwardable
- Defined in:
- lib/rounders/mail.rb
Instance Attribute Summary collapse
-
#mail ⇒ Object
readonly
Returns the value of attribute mail.
Instance Method Summary collapse
-
#initialize(mail) ⇒ Mail
constructor
A new instance of Mail.
- #text ⇒ Object
Constructor Details
#initialize(mail) ⇒ Mail
Returns a new instance of Mail.
53 54 55 |
# File 'lib/rounders/mail.rb', line 53 def initialize(mail) @mail = mail end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object (private)
71 72 73 74 75 76 77 |
# File 'lib/rounders/mail.rb', line 71 def method_missing(method, *args, &block) if mail.respond_to?(method) mail.public_send(method, *args, &block) else super end end |
Instance Attribute Details
#mail ⇒ Object (readonly)
Returns the value of attribute mail.
4 5 6 |
# File 'lib/rounders/mail.rb', line 4 def mail @mail end |
Instance Method Details
#text ⇒ Object
57 58 59 60 61 62 63 |
# File 'lib/rounders/mail.rb', line 57 def text if mail.multipart? mail.text_part.decoded else mail.decoded end end |