Class: Net::IMAP::BodyTypeBasic

Inherits:
Struct
  • Object
show all
Includes:
BodyStructure
Defined in:
lib/net/imap/response_data.rb

Overview

Net::IMAP::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 collapse

Instance Method Summary collapse

Instance Attribute Details

#content_idObject

Returns the value of attribute content_id

Returns:

  • (Object)

    the current value of content_id



766
767
768
# File 'lib/net/imap/response_data.rb', line 766

def content_id
  @content_id
end

#descriptionObject

Returns the value of attribute description

Returns:

  • (Object)

    the current value of description



766
767
768
# File 'lib/net/imap/response_data.rb', line 766

def description
  @description
end

#dispositionObject

Returns the value of attribute disposition

Returns:

  • (Object)

    the current value of disposition



766
767
768
# File 'lib/net/imap/response_data.rb', line 766

def disposition
  @disposition
end

#encodingObject

Returns the value of attribute encoding

Returns:

  • (Object)

    the current value of encoding



766
767
768
# File 'lib/net/imap/response_data.rb', line 766

def encoding
  @encoding
end

#extensionObject

Returns the value of attribute extension

Returns:

  • (Object)

    the current value of extension



766
767
768
# File 'lib/net/imap/response_data.rb', line 766

def extension
  @extension
end

#languageObject

Returns the value of attribute language

Returns:

  • (Object)

    the current value of language



766
767
768
# File 'lib/net/imap/response_data.rb', line 766

def language
  @language
end

#locationObject

Returns the value of attribute location

Returns:

  • (Object)

    the current value of location



766
767
768
# File 'lib/net/imap/response_data.rb', line 766

def location
  @location
end

#md5Object

Returns the value of attribute md5

Returns:

  • (Object)

    the current value of md5



766
767
768
# File 'lib/net/imap/response_data.rb', line 766

def md5
  @md5
end

#media_typeObject

Returns the value of attribute media_type

Returns:

  • (Object)

    the current value of media_type



766
767
768
# File 'lib/net/imap/response_data.rb', line 766

def media_type
  @media_type
end

#paramObject

Returns the value of attribute param

Returns:

  • (Object)

    the current value of param



766
767
768
# File 'lib/net/imap/response_data.rb', line 766

def param
  @param
end

#sizeObject

Returns the value of attribute size

Returns:

  • (Object)

    the current value of size



766
767
768
# File 'lib/net/imap/response_data.rb', line 766

def size
  @size
end

#subtypeObject

Returns the value of attribute subtype

Returns:

  • (Object)

    the current value of subtype



766
767
768
# File 'lib/net/imap/response_data.rb', line 766

def subtype
  @subtype
end

Instance Method Details

#media_subtypeObject

:call-seq: media_subtype -> subtype

Obsolete

Use subtype instead. Calling this will generate a warning message to stderr, then return the value of subtype.

– TODO: why not just keep this as an alias? Would “media_subtype” be used for something else? ++



882
883
884
885
# File 'lib/net/imap/response_data.rb', line 882

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

#multipart?Boolean

:call-seq: multipart? -> false

BodyTypeBasic is not used for multipart MIME parts.

Returns:

  • (Boolean)


868
869
870
# File 'lib/net/imap/response_data.rb', line 868

def multipart?
  return false
end