Class: Net::NNTP::HdrResponse
- Inherits:
-
ArticleBaseResponse
- Object
- Response
- OKResponse
- ArticleBaseResponse
- Net::NNTP::HdrResponse
- Includes:
- BodyBaseResponse
- Defined in:
- lib/net/nntp/response.rb
Overview
Code : 225
Instance Attribute Summary collapse
-
#list ⇒ Object
readonly
Returns the value of attribute list.
Attributes inherited from ArticleBaseResponse
Attributes inherited from Response
Instance Method Summary collapse
Methods included from BodyBaseResponse
Methods inherited from ArticleBaseResponse
Methods inherited from Response
#==, #body, class_from_code, create, #force_close?, #generic?, #has_body?, #initialize, #multiline?, #needs_article?
Constructor Details
This class inherits a constructor from Net::NNTP::ArticleBaseResponse
Instance Attribute Details
#list ⇒ Object (readonly)
Returns the value of attribute list.
432 433 434 |
# File 'lib/net/nntp/response.rb', line 432 def list @list end |
Instance Method Details
#parse_body ⇒ Object
433 434 435 436 437 438 439 |
# File 'lib/net/nntp/response.rb', line 433 def parse_body @list = {} @raw.split(/\r?\n/).each do |line| number, value = line.split(/\t/) @list[number.to_i] = value end end |