Class: Hermeneutics::Cli::ImapTools::ResponseStatus
- Defined in:
- lib/hermeneutics/cli/imap.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Class Method Summary collapse
Instance Method Summary collapse
- #bye? ⇒ Boolean
-
#initialize(status, data, text) ⇒ ResponseStatus
constructor
A new instance of ResponseStatus.
- #ok? ⇒ Boolean
- #to_s ⇒ Object
Methods inherited from Response
Constructor Details
#initialize(status, data, text) ⇒ ResponseStatus
Returns a new instance of ResponseStatus.
216 217 218 |
# File 'lib/hermeneutics/cli/imap.rb', line 216 def initialize status, data, text @status, @data, @text = status, data, text end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
215 216 217 |
# File 'lib/hermeneutics/cli/imap.rb', line 215 def data @data end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
215 216 217 |
# File 'lib/hermeneutics/cli/imap.rb', line 215 def status @status end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
215 216 217 |
# File 'lib/hermeneutics/cli/imap.rb', line 215 def text @text end |
Class Method Details
.create(reader) ⇒ Object
200 201 202 203 |
# File 'lib/hermeneutics/cli/imap.rb', line 200 def create reader l = compile_line reader new *l if l end |
Instance Method Details
#bye? ⇒ Boolean
220 |
# File 'lib/hermeneutics/cli/imap.rb', line 220 def bye? ; @status == :BYE ; end |
#ok? ⇒ Boolean
219 |
# File 'lib/hermeneutics/cli/imap.rb', line 219 def ok? ; @status == :OK ; end |
#to_s ⇒ Object
221 |
# File 'lib/hermeneutics/cli/imap.rb', line 221 def to_s ; "#{status} #{data} #{text}" ; end |