Class: TmailAdapter

Inherits:
Object
  • Object
show all
Defined in:
lib/unfuddle_my_email/tmail_adapter.rb

Instance Method Summary collapse

Constructor Details

#initialize(message) ⇒ TmailAdapter

Returns a new instance of TmailAdapter.



4
5
6
# File 'lib/unfuddle_my_email/tmail_adapter.rb', line 4

def initialize(message)
  @message = Mail.new(message)
end

Instance Method Details

#bodyObject



16
17
18
# File 'lib/unfuddle_my_email/tmail_adapter.rb', line 16

def body
  @message.body.decoded
end

#fromObject



12
13
14
# File 'lib/unfuddle_my_email/tmail_adapter.rb', line 12

def from
  @message.from.first
end

#subjectObject



8
9
10
# File 'lib/unfuddle_my_email/tmail_adapter.rb', line 8

def subject
  @message.subject
end