Class: MailRoom::Message

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

Direct Known Subclasses

IMAP::Message

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(uid:, body:) ⇒ Message

Returns a new instance of Message.



7
8
9
10
# File 'lib/mail_room/message.rb', line 7

def initialize(uid:, body:)
  @uid = uid
  @body = body
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



5
6
7
# File 'lib/mail_room/message.rb', line 5

def body
  @body
end

#uidObject (readonly)

Returns the value of attribute uid.



5
6
7
# File 'lib/mail_room/message.rb', line 5

def uid
  @uid
end

Instance Method Details

#==(other) ⇒ Object



12
13
14
# File 'lib/mail_room/message.rb', line 12

def ==(other)
  self.class == other.class && uid == other.uid && body == other.body
end