Flowdock
method

parse

Importance_0
v1_8_7_330 - Show latest stable - 0 notes - Class: SOAP::MIMEMessage
parse(head, str) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/soap/mimemessage.rb, line 167
  def parse(head, str)
    @headers = Headers.parse(head + "\r\n" + "From: jfh\r\n")
    boundary = @headers['content-type']['boundary']
    if boundary != nil
      parts = str.split(/--#{Regexp.quote(boundary)}\s*(?:\r\n|--\r\n)/)
      part = parts.shift        # preamble must be ignored.
      @parts = parts.collect { |part| Part.parse(part) }
    else
      @parts = [Part.parse(str)]
    end
    if @parts.length < 1
      raise MIMEMessageError.new("This message contains no valid parts!")
    end
    self
  end
Register or log in to add new notes.