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



825
826
827
# File 'lib/net/imap/response_data.rb', line 825

def content_id
  @content_id
end

#descriptionObject

Returns the value of attribute description

Returns:

  • (Object)

    the current value of description



825
826
827
# File 'lib/net/imap/response_data.rb', line 825

def description
  @description
end

#dispositionObject

Returns the value of attribute disposition

Returns:

  • (Object)

    the current value of disposition



825
826
827
# File 'lib/net/imap/response_data.rb', line 825

def disposition
  @disposition
end

#encodingObject

Returns the value of attribute encoding

Returns:

  • (Object)

    the current value of encoding



825
826
827
# File 'lib/net/imap/response_data.rb', line 825

def encoding
  @encoding
end

#extensionObject

Returns the value of attribute extension

Returns:

  • (Object)

    the current value of extension



825
826
827
# File 'lib/net/imap/response_data.rb', line 825

def extension
  @extension
end

#languageObject

Returns the value of attribute language

Returns:

  • (Object)

    the current value of language



825
826
827
# File 'lib/net/imap/response_data.rb', line 825

def language
  @language
end

#locationObject

Returns the value of attribute location

Returns:

  • (Object)

    the current value of location



825
826
827
# File 'lib/net/imap/response_data.rb', line 825

def location
  @location
end

#md5Object

Returns the value of attribute md5

Returns:

  • (Object)

    the current value of md5



825
826
827
# File 'lib/net/imap/response_data.rb', line 825

def md5
  @md5
end

#media_typeObject

Returns the value of attribute media_type

Returns:

  • (Object)

    the current value of media_type



825
826
827
# File 'lib/net/imap/response_data.rb', line 825

def media_type
  @media_type
end

#paramObject

Returns the value of attribute param

Returns:

  • (Object)

    the current value of param



825
826
827
# File 'lib/net/imap/response_data.rb', line 825

def param
  @param
end

#sizeObject

Returns the value of attribute size

Returns:

  • (Object)

    the current value of size



825
826
827
# File 'lib/net/imap/response_data.rb', line 825

def size
  @size
end

#subtypeObject

Returns the value of attribute subtype

Returns:

  • (Object)

    the current value of subtype



825
826
827
# File 'lib/net/imap/response_data.rb', line 825

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? ++



941
942
943
944
# File 'lib/net/imap/response_data.rb', line 941

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)


927
928
929
# File 'lib/net/imap/response_data.rb', line 927

def multipart?
  return false
end