Class: Email::Mboxrd::Message

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(supplied_body) ⇒ Message

Returns a new instance of Message.



9
10
11
12
# File 'lib/email/mboxrd/message.rb', line 9

def initialize(supplied_body)
  @supplied_body = supplied_body.clone
  @supplied_body.force_encoding('binary')
end

Instance Attribute Details

#supplied_bodyObject (readonly)

Returns the value of attribute supplied_body.



7
8
9
# File 'lib/email/mboxrd/message.rb', line 7

def supplied_body
  @supplied_body
end

Instance Method Details

#to_sObject



14
15
16
# File 'lib/email/mboxrd/message.rb', line 14

def to_s
  'From ' + from + "\n" + mboxrd_body + "\n"
end