Class: Rex::MIME::Part

Inherits:
Object
  • Object
show all
Defined in:
lib/rex/mime/part.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePart

Returns a new instance of Part.



10
11
12
13
# File 'lib/rex/mime/part.rb', line 10

def initialize
  self.header = Rex::MIME::Header.new
  self.content = ''
end

Instance Attribute Details

#contentObject

Returns the value of attribute content.



8
9
10
# File 'lib/rex/mime/part.rb', line 8

def content
  @content
end

#headerObject

Returns the value of attribute header.



8
9
10
# File 'lib/rex/mime/part.rb', line 8

def header
  @header
end

Instance Method Details

#to_sObject



15
16
17
# File 'lib/rex/mime/part.rb', line 15

def to_s
  self.header.to_s + "\r\n" + self.content + "\r\n"
end