Class: Net::IMAP::ResponseText

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

Overview

ResponseText represents texts of responses.

The text may be prefixed by a ResponseCode.

ResponseText is returned from TaggedResponse#data or UntaggedResponse#data for “status responses”:

  • every TaggedResponse, name is always “OK”, “NO”, or “BAD”.

  • any UntaggedResponse when name is “OK”, “NO”, “BAD”, “PREAUTH”, or “BYE”.

Note that these “status responses” are confusingly not the same as the STATUS UntaggedResponse (see IMAP#status and StatusData).

Constant Summary collapse

EMPTY =

Used to avoid an allocation when ResponseText is empty

new(nil, "").freeze

Instance Attribute Summary collapse

Instance Attribute Details

#codeObject

Returns the value of attribute code

Returns:

  • (Object)

    the current value of code



179
180
181
# File 'lib/net/imap/response_data.rb', line 179

def code
  @code
end

#textObject

Returns the value of attribute text

Returns:

  • (Object)

    the current value of text



179
180
181
# File 'lib/net/imap/response_data.rb', line 179

def text
  @text
end