Class: Net::NNTP::NewgroupsResponse
- Inherits:
-
GroupListResponse
- Object
- Response
- OKResponse
- GroupListResponse
- Net::NNTP::NewgroupsResponse
- Defined in:
- lib/net/nntp/response.rb
Overview
Code: 231
Instance Attribute Summary
Attributes inherited from GroupListResponse
Attributes inherited from Response
Instance Method Summary collapse
Methods inherited from GroupListResponse
Methods included from BodyBaseResponse
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::GroupListResponse
Instance Method Details
#parse_body ⇒ Object
453 454 455 456 457 458 459 |
# File 'lib/net/nntp/response.rb', line 453 def parse_body @raw.split(/\r?\n/).each do |line| break if line == '.' name, low, high, status = line.split(/\s+/) @list << OpenStruct.new(:name => name, :low => low.to_i, :high => high.to_i, :status => status.strip) end unless @raw.nil? end |