Class: Net::NNTP::HdrResponse

Inherits:
ArticleBaseResponse show all
Includes:
BodyBaseResponse
Defined in:
lib/net/nntp/response.rb

Overview

Code : 225

Instance Attribute Summary collapse

Attributes inherited from ArticleBaseResponse

#message_id, #number, #raw

Attributes inherited from Response

#code, #message, #request

Instance Method Summary collapse

Methods included from BodyBaseResponse

#body, #body=

Methods inherited from ArticleBaseResponse

#initialize

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

#listObject (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_bodyObject



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