Class: Net::NNTPListGroupResponse

Inherits:
NNTPLongResponse show all
Includes:
NNTPGroupResponseParser
Defined in:
lib/net/nntp/response/responses.rb

Constant Summary

Constants included from NNTPGroupResponseParser

Net::NNTPGroupResponseParser::PARSE_RE

Instance Attribute Summary collapse

Attributes included from NNTPGroupResponseParser

#group, #high, #low, #num_articles

Attributes inherited from NNTPLongResponse

#raw_data

Instance Method Summary collapse

Methods included from NNTPGroupResponseParser

#parse

Methods inherited from NNTPLongResponse

#has_long_response?

Instance Attribute Details

#articlesArray<Integer> (readonly)

Returns an array of article numbers

Returns:

  • (Array<Integer>)

    an array of article numbers


31
32
33
# File 'lib/net/nntp/response/responses.rb', line 31

def articles
  @articles
end

Instance Method Details

#handle_long_response(data) ⇒ Object


33
34
35
36
37
# File 'lib/net/nntp/response/responses.rb', line 33

def handle_long_response(data)
  super(data)
  @articles = @raw_data.split("\r\n")
  @articles.collect! { |article| article.to_i }
end