Class: Mailmate::Message

Inherits:
Object
  • Object
show all
Defined in:
lib/mailmate/message.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(mail, eml_id, path) ⇒ Message

Returns a new instance of Message.



17
18
19
20
21
# File 'lib/mailmate/message.rb', line 17

def initialize(mail, eml_id, path)
  @mail = mail
  @eml_id = eml_id.to_i
  @path = path
end

Instance Attribute Details

#eml_idObject (readonly)



15
16
17
# File 'lib/mailmate/message.rb', line 15

def eml_id
  @eml_id
end

#mailObject (readonly)



15
16
17
# File 'lib/mailmate/message.rb', line 15

def mail
  @mail
end

#pathObject (readonly)



15
16
17
# File 'lib/mailmate/message.rb', line 15

def path
  @path
end

Instance Method Details

#[](key) ⇒ Object



29
# File 'lib/mailmate/message.rb', line 29

def [](key); mail[key]; end