123456789_123456789_123456789_123456789_123456789_

Class: Net::IMAP::BodyTypeBasic

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Struct
Instance Chain:
self, BodyStructure, Struct
Inherits: Struct
  • Object
Defined in: lib/net/imap/response_data.rb

Overview

BodyTypeBasic represents basic body structures of messages and message parts, unless they have a Content-Type that is handled by BodyTypeText, BodyTypeMessage, or BodyTypeMultipart.

See [IMAP4rev1] §7.4.2 and [IMAP4rev2] §7.5.2 for full description of all BODYSTRUCTURE fields, and also Net::IMAP@Message+envelope+and+body+structure for other relevant RFCs.

Instance Attribute Summary

Instance Method Summary

Instance Attribute Details

#content_idString (rw)

Returns a string giving the content id as defined in [MIME-IMB] §7.

[ GitHub ]

  
# File 'lib/net/imap/response_data.rb', line 894

class BodyTypeBasic < Struct.new(:media_type, :subtype,
:param, :content_id,
:description, :encoding, :size,
:md5, :disposition, :language,
:location,
:extension)

#descriptionString (rw)

Returns a string giving the content description as defined in [MIME-IMB] §8.

[ GitHub ]

  
# File 'lib/net/imap/response_data.rb', line 894

class BodyTypeBasic < Struct.new(:media_type, :subtype,
:param, :content_id,
:description, :encoding, :size,
:md5, :disposition, :language,
:location,
:extension)

#dispositionContentDisposition (rw)

Returns a ContentDisposition object giving the content disposition, as defined by [DISPOSITION].

[ GitHub ]

  
# File 'lib/net/imap/response_data.rb', line 894

class BodyTypeBasic < Struct.new(:media_type, :subtype,
:param, :content_id,
:description, :encoding, :size,
:md5, :disposition, :language,
:location,
:extension)

#encodingString (rw)

Returns a string giving the content transfer encoding as defined in [MIME-IMB] §6.

[ GitHub ]

  
# File 'lib/net/imap/response_data.rb', line 894

class BodyTypeBasic < Struct.new(:media_type, :subtype,
:param, :content_id,
:description, :encoding, :size,
:md5, :disposition, :language,
:location,
:extension)

#extensionString (rw)

Returns extension data. The BODYSTRUCTURE fetch attribute contains extension data, but BODY does not.

[ GitHub ]

  
# File 'lib/net/imap/response_data.rb', line 894

class BodyTypeBasic < Struct.new(:media_type, :subtype,
:param, :content_id,
:description, :encoding, :size,
:md5, :disposition, :language,
:location,
:extension)

#languageString (rw)

Returns a string or an array of strings giving the body language value as defined in [LANGUAGE-TAGS].

[ GitHub ]

  
# File 'lib/net/imap/response_data.rb', line 894

class BodyTypeBasic < Struct.new(:media_type, :subtype,
:param, :content_id,
:description, :encoding, :size,
:md5, :disposition, :language,
:location,
:extension)

#location (rw)

BodyTypeBasic represents basic body structures of messages and message parts, unless they have a Content-Type that is handled by BodyTypeText, BodyTypeMessage, or BodyTypeMultipart.

See [IMAP4rev1] §7.4.2 and [IMAP4rev2] §7.5.2 for full description of all BODYSTRUCTURE fields, and also Net::IMAP@Message+envelope+and+body+structure for other relevant RFCs.

[ GitHub ]

  
# File 'lib/net/imap/response_data.rb', line 894

class BodyTypeBasic < Struct.new(:media_type, :subtype,
:param, :content_id,
:description, :encoding, :size,
:md5, :disposition, :language,
:location,
:extension)

#md5String (rw)

Returns a string giving the body MD5 value as defined in [MD5].

[ GitHub ]

  
# File 'lib/net/imap/response_data.rb', line 894

class BodyTypeBasic < Struct.new(:media_type, :subtype,
:param, :content_id,
:description, :encoding, :size,
:md5, :disposition, :language,
:location,
:extension)

#media_typeString (rw)

The top-level media type as defined in [MIME-IMB].

[ GitHub ]

  
# File 'lib/net/imap/response_data.rb', line 894

class BodyTypeBasic < Struct.new(:media_type, :subtype,
:param, :content_id,
:description, :encoding, :size,
:md5, :disposition, :language,
:location,
:extension)

#multipart?Boolean (readonly)

BodyTypeBasic is not used for multipart MIME parts.

[ GitHub ]

  
# File 'lib/net/imap/response_data.rb', line 996

def multipart?
  return false
end

#paramString (rw)

Returns a hash that represents parameters as defined in [MIME-IMB].

[ GitHub ]

  
# File 'lib/net/imap/response_data.rb', line 894

class BodyTypeBasic < Struct.new(:media_type, :subtype,
:param, :content_id,
:description, :encoding, :size,
:md5, :disposition, :language,
:location,
:extension)

#sizeInteger (rw)

Returns a number giving the size of the body in octets.

[ GitHub ]

  
# File 'lib/net/imap/response_data.rb', line 894

class BodyTypeBasic < Struct.new(:media_type, :subtype,
:param, :content_id,
:description, :encoding, :size,
:md5, :disposition, :language,
:location,
:extension)

#subtypeString (rw)

The media subtype name as defined in [MIME-IMB].

[ GitHub ]

  
# File 'lib/net/imap/response_data.rb', line 894

class BodyTypeBasic < Struct.new(:media_type, :subtype,
:param, :content_id,
:description, :encoding, :size,
:md5, :disposition, :language,
:location,
:extension)

Instance Method Details

#media_subtypesubtype

[Obsolete]

Use {subtype} instead.  Calling this will generate a warning message
to {stderr}, then return the value of {subtype}.
[ GitHub ]

  
# File 'lib/net/imap/response_data.rb', line 1010

def media_subtype
  warn("media_subtype is obsolete, use subtype instead.\n",
       uplevel: 1, category: :deprecated)
  return subtype
end