Class: MIME::Content::Text::Plain

Inherits:
Media show all
Defined in:
lib/safrano/multipart.rb

Overview

Well, it says plain text

Defined Under Namespace

Classes: Parser

Instance Attribute Summary

Attributes inherited from Media

#parser

Attributes inherited from Media

#content, #ct, #hd, #level, #response

Instance Method Summary collapse

Constructor Details

#initializePlain

Returns a new instance of Plain.



240
241
242
243
244
245
246
247
248
# File 'lib/safrano/multipart.rb', line 240

def initialize
  @hd = {}
  # we need it unfrozen --> +
  @content = +''
  # set default values. Can be overwritten by parser
  @hd[CTT_TYPE_LC] = TEXT_PLAIN
  @ct = TEXT_PLAIN
  @parser = Parser.new(self)
end

Instance Method Details

#==(other) ⇒ Object



254
255
256
# File 'lib/safrano/multipart.rb', line 254

def ==(other)
  (@hd == other.hd) && (@content == other.content)
end

#unparseObject



250
251
252
# File 'lib/safrano/multipart.rb', line 250

def unparse
  @content
end