Class: Artichoke::Message
- Inherits:
-
Object
- Object
- Artichoke::Message
- Defined in:
- lib/artichoke/message.rb
Instance Method Summary collapse
- #attachment_name ⇒ Object
-
#initialize(message) ⇒ Message
constructor
A new instance of Message.
- #message_content ⇒ Object
Constructor Details
#initialize(message) ⇒ Message
Returns a new instance of Message.
4 5 6 |
# File 'lib/artichoke/message.rb', line 4 def initialize() @message = end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args, &block) ⇒ Object (private)
Delegate all other methods to the Gmail message
18 19 20 21 22 23 24 |
# File 'lib/artichoke/message.rb', line 18 def method_missing(*args, &block) if block_given? @message.send(*args, &block) else @message.send(*args) end end |
Instance Method Details
#attachment_name ⇒ Object
8 9 10 |
# File 'lib/artichoke/message.rb', line 8 def .first.filename end |
#message_content ⇒ Object
12 13 14 |
# File 'lib/artichoke/message.rb', line 12 def text_part.try(:decoded) || html_part.try(:decoded) || body.decoded end |