Class: Hermeneutics::Cli::ImapTools::ResponseData
- Defined in:
- lib/hermeneutics/cli/imap.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#num ⇒ Object
readonly
Returns the value of attribute num.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(num, data) ⇒ ResponseData
constructor
A new instance of ResponseData.
- #to_s ⇒ Object
Methods inherited from Response
Constructor Details
#initialize(num, data) ⇒ ResponseData
Returns a new instance of ResponseData.
192 193 194 |
# File 'lib/hermeneutics/cli/imap.rb', line 192 def initialize num, data @num, @data = num, data end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
191 192 193 |
# File 'lib/hermeneutics/cli/imap.rb', line 191 def data @data end |
#num ⇒ Object (readonly)
Returns the value of attribute num.
191 192 193 |
# File 'lib/hermeneutics/cli/imap.rb', line 191 def num @num end |
Class Method Details
.create(reader) ⇒ Object
183 184 185 186 187 188 189 |
# File 'lib/hermeneutics/cli/imap.rb', line 183 def create reader if reader.peekline.slice! /\A(\d+) +/ then n = $1.to_i end data = compile_stream reader new n, data end |
Instance Method Details
#to_s ⇒ Object
195 |
# File 'lib/hermeneutics/cli/imap.rb', line 195 def to_s ; "#{num} #{data}" ; end |